2020-08-27 05:40:14 -04:00
|
|
|
/**
|
|
|
|
|
* 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/plugin-content-docs-types' {
|
2021-07-14 12:19:08 -04:00
|
|
|
type VersionBanner = import('./types').VersionBanner;
|
2021-08-02 05:02:43 -04:00
|
|
|
type GlobalDataVersion = import('./types').GlobalVersion;
|
|
|
|
|
type GlobalDataDoc = import('./types').GlobalDoc;
|
2021-08-19 04:31:15 -04:00
|
|
|
type VersionTag = import('./types').VersionTag;
|
|
|
|
|
|
|
|
|
|
export type {GlobalDataVersion, GlobalDataDoc};
|
2021-06-24 12:04:16 -04:00
|
|
|
|
2020-08-27 05:40:14 -04:00
|
|
|
export type PropVersionMetadata = {
|
2020-10-15 06:16:30 -04:00
|
|
|
pluginId: string;
|
2020-08-28 12:37:49 -04:00
|
|
|
version: string;
|
|
|
|
|
label: string;
|
2021-06-24 12:04:16 -04:00
|
|
|
banner: VersionBanner;
|
2020-09-03 08:35:46 -04:00
|
|
|
isLast: boolean;
|
2020-08-27 05:40:14 -04:00
|
|
|
docsSidebars: PropSidebars;
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-10 13:49:21 -05:00
|
|
|
type PropsSidebarItemBase = {
|
2021-03-17 12:28:42 -04:00
|
|
|
customProps?: Record<string, unknown>;
|
2020-12-10 13:49:21 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type PropSidebarItemLink = PropsSidebarItemBase & {
|
2020-08-27 05:40:14 -04:00
|
|
|
type: 'link';
|
|
|
|
|
href: string;
|
|
|
|
|
label: string;
|
|
|
|
|
};
|
|
|
|
|
|
2020-12-10 13:49:21 -05:00
|
|
|
export type PropSidebarItemCategory = PropsSidebarItemBase & {
|
2020-08-27 05:40:14 -04:00
|
|
|
type: 'category';
|
|
|
|
|
label: string;
|
|
|
|
|
items: PropSidebarItem[];
|
2021-07-23 08:24:36 -04:00
|
|
|
collapsed: boolean;
|
|
|
|
|
collapsible: boolean;
|
2020-08-27 05:40:14 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type PropSidebarItem = PropSidebarItemLink | PropSidebarItemCategory;
|
|
|
|
|
|
|
|
|
|
export type PropSidebars = {
|
|
|
|
|
[sidebarId: string]: PropSidebarItem[];
|
|
|
|
|
};
|
2021-06-16 07:18:53 -04:00
|
|
|
|
2021-08-19 04:31:15 -04:00
|
|
|
export type PropTagDocListDoc = {
|
|
|
|
|
id: string;
|
|
|
|
|
title: string;
|
|
|
|
|
description: string;
|
|
|
|
|
permalink: string;
|
|
|
|
|
};
|
|
|
|
|
export type PropTagDocList = {
|
|
|
|
|
allTagsPath: string;
|
|
|
|
|
name: string; // normalized name/label of the tag
|
|
|
|
|
permalink: string; // pathname of the tag
|
|
|
|
|
docs: PropTagDocListDoc[];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type PropTagsListPage = {
|
|
|
|
|
tags: {
|
|
|
|
|
name: string;
|
|
|
|
|
permalink: string;
|
|
|
|
|
count: number;
|
|
|
|
|
}[];
|
|
|
|
|
};
|
2020-08-27 05:40:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare module '@theme/DocItem' {
|
2020-12-11 10:30:53 -05:00
|
|
|
import type {TOCItem} from '@docusaurus/types';
|
2021-08-02 05:02:43 -04:00
|
|
|
import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs-types';
|
2020-08-27 05:40:14 -04:00
|
|
|
|
|
|
|
|
export type DocumentRoute = {
|
|
|
|
|
readonly component: () => JSX.Element;
|
|
|
|
|
readonly exact: boolean;
|
|
|
|
|
readonly path: string;
|
2021-07-09 10:50:38 -04:00
|
|
|
readonly sidebar?: string;
|
2020-08-27 05:40:14 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type FrontMatter = {
|
|
|
|
|
readonly id: string;
|
|
|
|
|
readonly title: string;
|
|
|
|
|
readonly image?: string;
|
|
|
|
|
readonly keywords?: readonly string[];
|
2021-08-11 10:07:17 -04:00
|
|
|
/* eslint-disable camelcase */
|
2020-08-27 05:40:14 -04:00
|
|
|
readonly hide_title?: boolean;
|
|
|
|
|
readonly hide_table_of_contents?: boolean;
|
2021-08-11 10:07:17 -04:00
|
|
|
/* eslint-enable camelcase */
|
2020-08-27 05:40:14 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type Metadata = {
|
|
|
|
|
readonly description?: string;
|
|
|
|
|
readonly title?: string;
|
|
|
|
|
readonly permalink?: string;
|
|
|
|
|
readonly editUrl?: string;
|
|
|
|
|
readonly lastUpdatedAt?: number;
|
2021-03-05 09:30:09 -05:00
|
|
|
readonly formattedLastUpdatedAt?: string;
|
2020-08-27 05:40:14 -04:00
|
|
|
readonly lastUpdatedBy?: string;
|
|
|
|
|
readonly version?: string;
|
2020-08-28 06:06:37 -04:00
|
|
|
readonly previous?: {readonly permalink: string; readonly title: string};
|
|
|
|
|
readonly next?: {readonly permalink: string; readonly title: string};
|
2021-08-19 04:31:15 -04:00
|
|
|
readonly tags: readonly {
|
|
|
|
|
readonly label: string;
|
|
|
|
|
readonly permalink: string;
|
|
|
|
|
}[];
|
2020-08-27 05:40:14 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export type Props = {
|
|
|
|
|
readonly route: DocumentRoute;
|
2021-06-24 12:04:16 -04:00
|
|
|
readonly versionMetadata: PropVersionMetadata;
|
2020-08-27 05:40:14 -04:00
|
|
|
readonly content: {
|
|
|
|
|
readonly frontMatter: FrontMatter;
|
|
|
|
|
readonly metadata: Metadata;
|
2020-12-11 10:30:53 -05:00
|
|
|
readonly toc: readonly TOCItem[];
|
2021-06-03 11:45:19 -04:00
|
|
|
readonly contentTitle: string | undefined;
|
2020-08-27 05:40:14 -04:00
|
|
|
(): JSX.Element;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const DocItem: (props: Props) => JSX.Element;
|
|
|
|
|
export default DocItem;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-19 04:31:15 -04:00
|
|
|
declare module '@theme/DocItemFooter' {
|
|
|
|
|
import type {Props} from '@theme/DocItem';
|
|
|
|
|
|
|
|
|
|
export default function DocItemFooter(props: Props): JSX.Element;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare module '@theme/DocTagsListPage' {
|
|
|
|
|
import type {PropTagsListPage} from '@docusaurus/plugin-content-docs-types';
|
|
|
|
|
|
|
|
|
|
export type Props = PropTagsListPage;
|
|
|
|
|
export default function DocItemFooter(props: Props): JSX.Element;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-24 12:04:16 -04:00
|
|
|
declare module '@theme/DocVersionBanner' {
|
|
|
|
|
import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs-types';
|
|
|
|
|
|
|
|
|
|
export type Props = {
|
|
|
|
|
readonly versionMetadata: PropVersionMetadata;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const DocVersionBanner: (props: Props) => JSX.Element;
|
|
|
|
|
export default DocVersionBanner;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-27 05:40:14 -04:00
|
|
|
declare module '@theme/DocPage' {
|
|
|
|
|
import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs-types';
|
|
|
|
|
import type {DocumentRoute} from '@theme/DocItem';
|
|
|
|
|
|
|
|
|
|
export type Props = {
|
|
|
|
|
readonly location: {readonly pathname: string};
|
|
|
|
|
readonly versionMetadata: PropVersionMetadata;
|
|
|
|
|
readonly route: {
|
|
|
|
|
readonly path: string;
|
|
|
|
|
readonly component: () => JSX.Element;
|
2021-03-19 06:32:38 -04:00
|
|
|
readonly routes: DocumentRoute[];
|
2020-08-27 05:40:14 -04:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const DocPage: (props: Props) => JSX.Element;
|
|
|
|
|
export default DocPage;
|
|
|
|
|
}
|
2021-02-18 09:38:55 -05:00
|
|
|
|
|
|
|
|
declare module '@theme/Seo' {
|
|
|
|
|
export type Props = {
|
|
|
|
|
readonly title?: string;
|
|
|
|
|
readonly description?: string;
|
|
|
|
|
readonly keywords?: readonly string[] | string;
|
|
|
|
|
readonly image?: string;
|
2021-08-20 10:36:18 -04:00
|
|
|
readonly children?: ReactNode;
|
2021-02-18 09:38:55 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const Seo: (props: Props) => JSX.Element;
|
|
|
|
|
export default Seo;
|
|
|
|
|
}
|
2021-08-05 04:52:35 -04:00
|
|
|
|
|
|
|
|
declare module '@theme/hooks/useDocs' {
|
|
|
|
|
type GlobalPluginData = import('./types').GlobalPluginData;
|
|
|
|
|
type GlobalVersion = import('./types').GlobalVersion;
|
|
|
|
|
type ActivePlugin = import('./client/docsClientUtils').ActivePlugin;
|
|
|
|
|
type ActiveDocContext = import('./client/docsClientUtils').ActiveDocContext;
|
|
|
|
|
type DocVersionSuggestions = import('./client/docsClientUtils').DocVersionSuggestions;
|
|
|
|
|
|
|
|
|
|
export type {GlobalPluginData, GlobalVersion};
|
|
|
|
|
export const useAllDocsData: () => Record<string, GlobalPluginData>;
|
|
|
|
|
export const useDocsData: (pluginId?: string) => GlobalPluginData;
|
|
|
|
|
export const useActivePlugin: (
|
|
|
|
|
options: GetActivePluginOptions = {},
|
|
|
|
|
) => ActivePlugin | undefined;
|
|
|
|
|
export const useActivePluginAndVersion: (
|
|
|
|
|
options: GetActivePluginOptions = {},
|
|
|
|
|
) =>
|
|
|
|
|
| {activePlugin: ActivePlugin; activeVersion: GlobalVersion | undefined}
|
|
|
|
|
| undefined;
|
|
|
|
|
export const useVersions: (pluginId?: string) => GlobalVersion[];
|
|
|
|
|
export const useLatestVersion: (pluginId?: string) => GlobalVersion;
|
|
|
|
|
export const useActiveVersion: (
|
|
|
|
|
pluginId?: string,
|
|
|
|
|
) => GlobalVersion | undefined;
|
|
|
|
|
export const useActiveDocContext: (pluginId?: string) => ActiveDocContext;
|
|
|
|
|
export const useDocVersionSuggestions: (
|
|
|
|
|
pluginId?: string,
|
|
|
|
|
) => DocVersionSuggestions;
|
|
|
|
|
}
|