@docusaurus/theme-classic 0.0.0-4611 → 0.0.0-4614
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/theme-classic.d.ts
CHANGED
|
@@ -208,9 +208,9 @@ declare module '@theme/DocSidebarItems' {
|
|
|
208
208
|
import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
|
|
209
209
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
210
210
|
|
|
211
|
-
export
|
|
211
|
+
export interface Props extends Omit<DocSidebarItemProps, 'item' | 'index'> {
|
|
212
212
|
readonly items: readonly PropSidebarItem[];
|
|
213
|
-
}
|
|
213
|
+
}
|
|
214
214
|
|
|
215
215
|
export default function DocSidebarItems(props: Props): JSX.Element;
|
|
216
216
|
}
|
|
@@ -381,15 +381,15 @@ declare module '@theme/NavbarItem/DefaultNavbarItem' {
|
|
|
381
381
|
|
|
382
382
|
declare module '@theme/NavbarItem/NavbarNavLink' {
|
|
383
383
|
import type {ReactNode} from 'react';
|
|
384
|
-
import type {LinkProps} from '@docusaurus/Link';
|
|
384
|
+
import type {Props as LinkProps} from '@docusaurus/Link';
|
|
385
385
|
|
|
386
|
-
export
|
|
386
|
+
export interface Props extends LinkProps {
|
|
387
387
|
readonly activeBasePath?: string;
|
|
388
388
|
readonly activeBaseRegex?: string;
|
|
389
389
|
readonly exact?: boolean;
|
|
390
390
|
readonly label?: ReactNode;
|
|
391
391
|
readonly prependBaseUrlToHref?: string;
|
|
392
|
-
}
|
|
392
|
+
}
|
|
393
393
|
|
|
394
394
|
export default function NavbarNavLink(props: Props): JSX.Element;
|
|
395
395
|
}
|
|
@@ -605,67 +605,58 @@ declare module '@theme/Details' {
|
|
|
605
605
|
declare module '@theme/TOCItems' {
|
|
606
606
|
import type {TOCItem} from '@docusaurus/types';
|
|
607
607
|
|
|
608
|
-
export
|
|
608
|
+
export interface Props {
|
|
609
609
|
readonly toc: readonly TOCItem[];
|
|
610
610
|
readonly minHeadingLevel?: number;
|
|
611
611
|
readonly maxHeadingLevel?: number;
|
|
612
612
|
readonly className?: string;
|
|
613
613
|
readonly linkClassName?: string | null;
|
|
614
614
|
readonly linkActiveClassName?: string;
|
|
615
|
-
}
|
|
615
|
+
}
|
|
616
616
|
|
|
617
|
-
export default function TOCItems(props:
|
|
617
|
+
export default function TOCItems(props: Props): JSX.Element;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
declare module '@theme/TOC' {
|
|
621
621
|
import type {TOCItem} from '@docusaurus/types';
|
|
622
622
|
|
|
623
|
-
// minHeadingLevel only exists as a per-doc option,
|
|
624
|
-
//
|
|
625
|
-
|
|
626
|
-
export type TOCProps = {
|
|
623
|
+
// minHeadingLevel only exists as a per-doc option, and won't have a default
|
|
624
|
+
// set by Joi. See TOC, TOCInline, TOCCollapsible for examples
|
|
625
|
+
export interface Props {
|
|
627
626
|
readonly toc: readonly TOCItem[];
|
|
628
627
|
readonly minHeadingLevel?: number;
|
|
629
628
|
readonly maxHeadingLevel?: number;
|
|
630
629
|
readonly className?: string;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
export type TOCHeadingsProps = {
|
|
634
|
-
readonly toc: readonly TOCItem[];
|
|
635
|
-
readonly minHeadingLevel?: number;
|
|
636
|
-
readonly maxHeadingLevel?: number;
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
export const TOCHeadings: (props: TOCHeadingsProps) => JSX.Element;
|
|
630
|
+
}
|
|
640
631
|
|
|
641
|
-
const TOC: (props:
|
|
632
|
+
const TOC: (props: Props) => JSX.Element;
|
|
642
633
|
export default TOC;
|
|
643
634
|
}
|
|
644
635
|
|
|
645
636
|
declare module '@theme/TOCInline' {
|
|
646
637
|
import type {TOCItem} from '@docusaurus/types';
|
|
647
638
|
|
|
648
|
-
export
|
|
639
|
+
export interface Props {
|
|
649
640
|
readonly toc: readonly TOCItem[];
|
|
650
641
|
readonly minHeadingLevel?: number;
|
|
651
642
|
readonly maxHeadingLevel?: number;
|
|
652
|
-
}
|
|
643
|
+
}
|
|
653
644
|
|
|
654
|
-
const TOCInline: (props:
|
|
645
|
+
const TOCInline: (props: Props) => JSX.Element;
|
|
655
646
|
export default TOCInline;
|
|
656
647
|
}
|
|
657
648
|
|
|
658
649
|
declare module '@theme/TOCCollapsible' {
|
|
659
650
|
import type {TOCItem} from '@docusaurus/types';
|
|
660
651
|
|
|
661
|
-
export
|
|
652
|
+
export interface Props {
|
|
662
653
|
readonly className?: string;
|
|
663
654
|
readonly minHeadingLevel?: number;
|
|
664
655
|
readonly maxHeadingLevel?: number;
|
|
665
656
|
readonly toc: readonly TOCItem[];
|
|
666
|
-
}
|
|
657
|
+
}
|
|
667
658
|
|
|
668
|
-
const TOCCollapsible: (props:
|
|
659
|
+
const TOCCollapsible: (props: Props) => JSX.Element;
|
|
669
660
|
export default TOCCollapsible;
|
|
670
661
|
}
|
|
671
662
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4614",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@docusaurus/core": "0.0.0-
|
|
25
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
28
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
30
|
-
"@docusaurus/utils": "0.0.0-
|
|
31
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
32
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
24
|
+
"@docusaurus/core": "0.0.0-4614",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4614",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4614",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4614",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4614",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4614",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4614",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4614",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4614",
|
|
33
33
|
"@mdx-js/react": "^1.6.22",
|
|
34
34
|
"clsx": "^1.1.1",
|
|
35
35
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"rtlcss": "^3.3.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
46
|
-
"@docusaurus/types": "0.0.0-
|
|
45
|
+
"@docusaurus/module-type-aliases": "0.0.0-4614",
|
|
46
|
+
"@docusaurus/types": "0.0.0-4614",
|
|
47
47
|
"@types/mdx-js__react": "^1.5.5",
|
|
48
48
|
"@types/prismjs": "^1.26.0",
|
|
49
49
|
"@types/rtlcss": "^3.1.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "0fa2e52fbc24ea9aa80a5da40149036009bcf21c"
|
|
63
63
|
}
|
package/src/theme/TOC/index.tsx
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import type {
|
|
10
|
+
import type {Props} from '@theme/TOC';
|
|
11
11
|
import TOCItems from '@theme/TOCItems';
|
|
12
12
|
import styles from './styles.module.css';
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ import styles from './styles.module.css';
|
|
|
16
16
|
const LINK_CLASS_NAME = 'table-of-contents__link toc-highlight';
|
|
17
17
|
const LINK_ACTIVE_CLASS_NAME = 'table-of-contents__link--active';
|
|
18
18
|
|
|
19
|
-
function TOC({className, ...props}:
|
|
19
|
+
function TOC({className, ...props}: Props): JSX.Element {
|
|
20
20
|
return (
|
|
21
21
|
<div className={clsx(styles.tableOfContents, 'thin-scrollbar', className)}>
|
|
22
22
|
<TOCItems
|
|
@@ -11,14 +11,14 @@ import Translate from '@docusaurus/Translate';
|
|
|
11
11
|
import {useCollapsible, Collapsible} from '@docusaurus/theme-common';
|
|
12
12
|
import styles from './styles.module.css';
|
|
13
13
|
import TOCItems from '@theme/TOCItems';
|
|
14
|
-
import type {
|
|
14
|
+
import type {Props} from '@theme/TOCCollapsible';
|
|
15
15
|
|
|
16
16
|
export default function TOCCollapsible({
|
|
17
17
|
toc,
|
|
18
18
|
className,
|
|
19
19
|
minHeadingLevel,
|
|
20
20
|
maxHeadingLevel,
|
|
21
|
-
}:
|
|
21
|
+
}: Props): JSX.Element {
|
|
22
22
|
const {collapsed, toggleCollapsed} = useCollapsible({
|
|
23
23
|
initialState: true,
|
|
24
24
|
});
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type {
|
|
9
|
+
import type {Props} from '@theme/TOCInline';
|
|
10
10
|
import styles from './styles.module.css';
|
|
11
11
|
import TOCItems from '@theme/TOCItems';
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ function TOCInline({
|
|
|
14
14
|
toc,
|
|
15
15
|
minHeadingLevel,
|
|
16
16
|
maxHeadingLevel,
|
|
17
|
-
}:
|
|
17
|
+
}: Props): JSX.Element {
|
|
18
18
|
return (
|
|
19
19
|
<div className={styles.tableOfContentsInline}>
|
|
20
20
|
<TOCItems
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React, {useMemo} from 'react';
|
|
9
|
-
import type {
|
|
9
|
+
import type {Props} from '@theme/TOCItems';
|
|
10
10
|
import type {TOCItem} from '@docusaurus/types';
|
|
11
11
|
import {
|
|
12
12
|
type TOCHighlightConfig,
|
|
@@ -62,7 +62,7 @@ export default function TOCItems({
|
|
|
62
62
|
minHeadingLevel: minHeadingLevelOption,
|
|
63
63
|
maxHeadingLevel: maxHeadingLevelOption,
|
|
64
64
|
...props
|
|
65
|
-
}:
|
|
65
|
+
}: Props): JSX.Element | null {
|
|
66
66
|
const themeConfig = useThemeConfig();
|
|
67
67
|
|
|
68
68
|
const minHeadingLevel =
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -208,9 +208,9 @@ declare module '@theme/DocSidebarItems' {
|
|
|
208
208
|
import type {Props as DocSidebarItemProps} from '@theme/DocSidebarItem';
|
|
209
209
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
210
210
|
|
|
211
|
-
export
|
|
211
|
+
export interface Props extends Omit<DocSidebarItemProps, 'item' | 'index'> {
|
|
212
212
|
readonly items: readonly PropSidebarItem[];
|
|
213
|
-
}
|
|
213
|
+
}
|
|
214
214
|
|
|
215
215
|
export default function DocSidebarItems(props: Props): JSX.Element;
|
|
216
216
|
}
|
|
@@ -381,15 +381,15 @@ declare module '@theme/NavbarItem/DefaultNavbarItem' {
|
|
|
381
381
|
|
|
382
382
|
declare module '@theme/NavbarItem/NavbarNavLink' {
|
|
383
383
|
import type {ReactNode} from 'react';
|
|
384
|
-
import type {LinkProps} from '@docusaurus/Link';
|
|
384
|
+
import type {Props as LinkProps} from '@docusaurus/Link';
|
|
385
385
|
|
|
386
|
-
export
|
|
386
|
+
export interface Props extends LinkProps {
|
|
387
387
|
readonly activeBasePath?: string;
|
|
388
388
|
readonly activeBaseRegex?: string;
|
|
389
389
|
readonly exact?: boolean;
|
|
390
390
|
readonly label?: ReactNode;
|
|
391
391
|
readonly prependBaseUrlToHref?: string;
|
|
392
|
-
}
|
|
392
|
+
}
|
|
393
393
|
|
|
394
394
|
export default function NavbarNavLink(props: Props): JSX.Element;
|
|
395
395
|
}
|
|
@@ -605,67 +605,58 @@ declare module '@theme/Details' {
|
|
|
605
605
|
declare module '@theme/TOCItems' {
|
|
606
606
|
import type {TOCItem} from '@docusaurus/types';
|
|
607
607
|
|
|
608
|
-
export
|
|
608
|
+
export interface Props {
|
|
609
609
|
readonly toc: readonly TOCItem[];
|
|
610
610
|
readonly minHeadingLevel?: number;
|
|
611
611
|
readonly maxHeadingLevel?: number;
|
|
612
612
|
readonly className?: string;
|
|
613
613
|
readonly linkClassName?: string | null;
|
|
614
614
|
readonly linkActiveClassName?: string;
|
|
615
|
-
}
|
|
615
|
+
}
|
|
616
616
|
|
|
617
|
-
export default function TOCItems(props:
|
|
617
|
+
export default function TOCItems(props: Props): JSX.Element;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
declare module '@theme/TOC' {
|
|
621
621
|
import type {TOCItem} from '@docusaurus/types';
|
|
622
622
|
|
|
623
|
-
// minHeadingLevel only exists as a per-doc option,
|
|
624
|
-
//
|
|
625
|
-
|
|
626
|
-
export type TOCProps = {
|
|
623
|
+
// minHeadingLevel only exists as a per-doc option, and won't have a default
|
|
624
|
+
// set by Joi. See TOC, TOCInline, TOCCollapsible for examples
|
|
625
|
+
export interface Props {
|
|
627
626
|
readonly toc: readonly TOCItem[];
|
|
628
627
|
readonly minHeadingLevel?: number;
|
|
629
628
|
readonly maxHeadingLevel?: number;
|
|
630
629
|
readonly className?: string;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
export type TOCHeadingsProps = {
|
|
634
|
-
readonly toc: readonly TOCItem[];
|
|
635
|
-
readonly minHeadingLevel?: number;
|
|
636
|
-
readonly maxHeadingLevel?: number;
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
export const TOCHeadings: (props: TOCHeadingsProps) => JSX.Element;
|
|
630
|
+
}
|
|
640
631
|
|
|
641
|
-
const TOC: (props:
|
|
632
|
+
const TOC: (props: Props) => JSX.Element;
|
|
642
633
|
export default TOC;
|
|
643
634
|
}
|
|
644
635
|
|
|
645
636
|
declare module '@theme/TOCInline' {
|
|
646
637
|
import type {TOCItem} from '@docusaurus/types';
|
|
647
638
|
|
|
648
|
-
export
|
|
639
|
+
export interface Props {
|
|
649
640
|
readonly toc: readonly TOCItem[];
|
|
650
641
|
readonly minHeadingLevel?: number;
|
|
651
642
|
readonly maxHeadingLevel?: number;
|
|
652
|
-
}
|
|
643
|
+
}
|
|
653
644
|
|
|
654
|
-
const TOCInline: (props:
|
|
645
|
+
const TOCInline: (props: Props) => JSX.Element;
|
|
655
646
|
export default TOCInline;
|
|
656
647
|
}
|
|
657
648
|
|
|
658
649
|
declare module '@theme/TOCCollapsible' {
|
|
659
650
|
import type {TOCItem} from '@docusaurus/types';
|
|
660
651
|
|
|
661
|
-
export
|
|
652
|
+
export interface Props {
|
|
662
653
|
readonly className?: string;
|
|
663
654
|
readonly minHeadingLevel?: number;
|
|
664
655
|
readonly maxHeadingLevel?: number;
|
|
665
656
|
readonly toc: readonly TOCItem[];
|
|
666
|
-
}
|
|
657
|
+
}
|
|
667
658
|
|
|
668
|
-
const TOCCollapsible: (props:
|
|
659
|
+
const TOCCollapsible: (props: Props) => JSX.Element;
|
|
669
660
|
export default TOCCollapsible;
|
|
670
661
|
}
|
|
671
662
|
|