@docusaurus/theme-classic 0.0.0-5076 → 0.0.0-5077

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.
@@ -61,9 +61,7 @@ function BlogPostPageContent(props) {
61
61
  <BlogLayout
62
62
  sidebar={sidebar}
63
63
  toc={
64
- !hideTableOfContents &&
65
- BlogPostContents.toc &&
66
- BlogPostContents.toc.length > 0 ? (
64
+ !hideTableOfContents && BlogPostContents.toc.length > 0 ? (
67
65
  <TOC
68
66
  toc={BlogPostContents.toc}
69
67
  minHeadingLevel={tocMinHeadingLevel}
@@ -22,7 +22,7 @@ export default function DocCardList({items, className}) {
22
22
  <section className={clsx('row', className)}>
23
23
  {filterItems(items).map((item, index) => (
24
24
  <article key={index} className="col col--6 margin-bottom--lg">
25
- <DocCard key={index} item={item} />
25
+ <DocCard item={item} />
26
26
  </article>
27
27
  ))}
28
28
  </section>
@@ -46,8 +46,7 @@ function DocItemContent(props) {
46
46
  const shouldAddTitle =
47
47
  !hideTitle && typeof DocContent.contentTitle === 'undefined';
48
48
  const windowSize = useWindowSize();
49
- const canRenderTOC =
50
- !hideTableOfContents && DocContent.toc && DocContent.toc.length > 0;
49
+ const canRenderTOC = !hideTableOfContents && DocContent.toc.length > 0;
51
50
  const renderTocDesktop =
52
51
  canRenderTOC && (windowSize === 'desktop' || windowSize === 'ssr');
53
52
  return (
@@ -37,7 +37,7 @@ export default function MDXPage(props) {
37
37
  <MDXPageContent />
38
38
  </MDXContent>
39
39
  </div>
40
- {!hideTableOfContents && MDXPageContent.toc && (
40
+ {!hideTableOfContents && MDXPageContent.toc.length > 0 && (
41
41
  <div className="col col--2">
42
42
  <TOC
43
43
  toc={MDXPageContent.toc}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5076",
3
+ "version": "0.0.0-5077",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -20,18 +20,18 @@
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "0.0.0-5076",
24
- "@docusaurus/mdx-loader": "0.0.0-5076",
25
- "@docusaurus/module-type-aliases": "0.0.0-5076",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5076",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5076",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5076",
29
- "@docusaurus/theme-common": "0.0.0-5076",
30
- "@docusaurus/theme-translations": "0.0.0-5076",
31
- "@docusaurus/types": "0.0.0-5076",
32
- "@docusaurus/utils": "0.0.0-5076",
33
- "@docusaurus/utils-common": "0.0.0-5076",
34
- "@docusaurus/utils-validation": "0.0.0-5076",
23
+ "@docusaurus/core": "0.0.0-5077",
24
+ "@docusaurus/mdx-loader": "0.0.0-5077",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5077",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5077",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5077",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5077",
29
+ "@docusaurus/theme-common": "0.0.0-5077",
30
+ "@docusaurus/theme-translations": "0.0.0-5077",
31
+ "@docusaurus/types": "0.0.0-5077",
32
+ "@docusaurus/utils": "0.0.0-5077",
33
+ "@docusaurus/utils-common": "0.0.0-5077",
34
+ "@docusaurus/utils-validation": "0.0.0-5077",
35
35
  "@mdx-js/react": "^1.6.22",
36
36
  "clsx": "^1.1.1",
37
37
  "copy-text-to-clipboard": "^3.0.1",
@@ -64,5 +64,5 @@
64
64
  "engines": {
65
65
  "node": ">=16.14"
66
66
  },
67
- "gitHead": "818667514c2990bdfe900ce5e9eebc9f23dafd95"
67
+ "gitHead": "c94e9b3454e0518e25d5a8cdf85278a491125b19"
68
68
  }
@@ -65,9 +65,7 @@ function BlogPostPageContent(props: Props): JSX.Element {
65
65
  <BlogLayout
66
66
  sidebar={sidebar}
67
67
  toc={
68
- !hideTableOfContents &&
69
- BlogPostContents.toc &&
70
- BlogPostContents.toc.length > 0 ? (
68
+ !hideTableOfContents && BlogPostContents.toc.length > 0 ? (
71
69
  <TOC
72
70
  toc={BlogPostContents.toc}
73
71
  minHeadingLevel={tocMinHeadingLevel}
@@ -27,7 +27,7 @@ export default function DocCardList({items, className}: Props): JSX.Element {
27
27
  <section className={clsx('row', className)}>
28
28
  {filterItems(items).map((item, index) => (
29
29
  <article key={index} className="col col--6 margin-bottom--lg">
30
- <DocCard key={index} item={item} />
30
+ <DocCard item={item} />
31
31
  </article>
32
32
  ))}
33
33
  </section>
@@ -55,8 +55,7 @@ function DocItemContent(props: Props): JSX.Element {
55
55
 
56
56
  const windowSize = useWindowSize();
57
57
 
58
- const canRenderTOC =
59
- !hideTableOfContents && DocContent.toc && DocContent.toc.length > 0;
58
+ const canRenderTOC = !hideTableOfContents && DocContent.toc.length > 0;
60
59
 
61
60
  const renderTocDesktop =
62
61
  canRenderTOC && (windowSize === 'desktop' || windowSize === 'ssr');
@@ -42,7 +42,7 @@ export default function MDXPage(props: Props): JSX.Element {
42
42
  <MDXPageContent />
43
43
  </MDXContent>
44
44
  </div>
45
- {!hideTableOfContents && MDXPageContent.toc && (
45
+ {!hideTableOfContents && MDXPageContent.toc.length > 0 && (
46
46
  <div className="col col--2">
47
47
  <TOC
48
48
  toc={MDXPageContent.toc}
@@ -328,8 +328,6 @@ declare module '@theme/DocSidebar' {
328
328
  readonly sidebar: readonly PropSidebarItem[];
329
329
  readonly onCollapse: () => void;
330
330
  readonly isHidden: boolean;
331
- // MobileSecondaryFilter expects Record<string, unknown>
332
- readonly [key: string]: unknown;
333
331
  }
334
332
 
335
333
  export default function DocSidebar(props: Props): JSX.Element;