@docusaurus/theme-classic 0.0.0-5656 → 0.0.0-5658

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.
@@ -6,7 +6,6 @@
6
6
  */
7
7
  import React, {useCallback, useState, useRef, useEffect} from 'react';
8
8
  import clsx from 'clsx';
9
- // @ts-expect-error: TODO, we need to make theme-classic have type: module
10
9
  import copy from 'copy-text-to-clipboard';
11
10
  import {translate} from '@docusaurus/Translate';
12
11
  import IconCopy from '@theme/Icon/Copy';
@@ -5,7 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- // @ts-expect-error: TODO see https://github.com/microsoft/TypeScript/issues/49721
9
8
  import {MDXProvider} from '@mdx-js/react';
10
9
  import MDXComponents from '@theme/MDXComponents';
11
10
  export default function MDXContent({children}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5656",
3
+ "version": "0.0.0-5658",
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-5656",
24
- "@docusaurus/mdx-loader": "0.0.0-5656",
25
- "@docusaurus/module-type-aliases": "0.0.0-5656",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5656",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5656",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5656",
29
- "@docusaurus/theme-common": "0.0.0-5656",
30
- "@docusaurus/theme-translations": "0.0.0-5656",
31
- "@docusaurus/types": "0.0.0-5656",
32
- "@docusaurus/utils": "0.0.0-5656",
33
- "@docusaurus/utils-common": "0.0.0-5656",
34
- "@docusaurus/utils-validation": "0.0.0-5656",
23
+ "@docusaurus/core": "0.0.0-5658",
24
+ "@docusaurus/mdx-loader": "0.0.0-5658",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5658",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5658",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5658",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5658",
29
+ "@docusaurus/theme-common": "0.0.0-5658",
30
+ "@docusaurus/theme-translations": "0.0.0-5658",
31
+ "@docusaurus/types": "0.0.0-5658",
32
+ "@docusaurus/utils": "0.0.0-5658",
33
+ "@docusaurus/utils-common": "0.0.0-5658",
34
+ "@docusaurus/utils-validation": "0.0.0-5658",
35
35
  "@mdx-js/react": "^2.1.5",
36
36
  "clsx": "^1.2.1",
37
37
  "copy-text-to-clipboard": "^3.2.0",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=16.14"
64
64
  },
65
- "gitHead": "e466521f445a37cd89f68c283d1afd5f5b5c835c"
65
+ "gitHead": "e9c50875dae0de9fd8f5a1449d8093c96292544e"
66
66
  }
@@ -7,7 +7,6 @@
7
7
 
8
8
  import React, {useCallback, useState, useRef, useEffect} from 'react';
9
9
  import clsx from 'clsx';
10
- // @ts-expect-error: TODO, we need to make theme-classic have type: module
11
10
  import copy from 'copy-text-to-clipboard';
12
11
  import {translate} from '@docusaurus/Translate';
13
12
  import type {Props} from '@theme/CodeBlock/CopyButton';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import React from 'react';
8
+ import React, {type ComponentProps} from 'react';
9
9
  import Head from '@docusaurus/Head';
10
10
  import MDXCode from '@theme/MDXComponents/Code';
11
11
  import MDXA from '@theme/MDXComponents/A';
@@ -28,12 +28,12 @@ const MDXComponents: MDXComponentsObject = {
28
28
  pre: MDXPre,
29
29
  ul: MDXUl,
30
30
  img: MDXImg,
31
- h1: (props) => <MDXHeading as="h1" {...props} />,
32
- h2: (props) => <MDXHeading as="h2" {...props} />,
33
- h3: (props) => <MDXHeading as="h3" {...props} />,
34
- h4: (props) => <MDXHeading as="h4" {...props} />,
35
- h5: (props) => <MDXHeading as="h5" {...props} />,
36
- h6: (props) => <MDXHeading as="h6" {...props} />,
31
+ h1: (props: ComponentProps<'h1'>) => <MDXHeading as="h1" {...props} />,
32
+ h2: (props: ComponentProps<'h2'>) => <MDXHeading as="h2" {...props} />,
33
+ h3: (props: ComponentProps<'h3'>) => <MDXHeading as="h3" {...props} />,
34
+ h4: (props: ComponentProps<'h4'>) => <MDXHeading as="h4" {...props} />,
35
+ h5: (props: ComponentProps<'h5'>) => <MDXHeading as="h5" {...props} />,
36
+ h6: (props: ComponentProps<'h6'>) => <MDXHeading as="h6" {...props} />,
37
37
  admonition: Admonition,
38
38
  mermaid: Mermaid,
39
39
  };
@@ -6,7 +6,6 @@
6
6
  */
7
7
 
8
8
  import React from 'react';
9
- // @ts-expect-error: TODO see https://github.com/microsoft/TypeScript/issues/49721
10
9
  import {MDXProvider} from '@mdx-js/react';
11
10
  import MDXComponents from '@theme/MDXComponents';
12
11
  import type {Props} from '@theme/MDXContent';
@@ -891,7 +891,11 @@ declare module '@theme/MDXComponents' {
891
891
  import type Mermaid from '@theme/Mermaid';
892
892
  import type Head from '@docusaurus/Head';
893
893
 
894
- export type MDXComponentsObject = {
894
+ import type {MDXProvider} from '@mdx-js/react';
895
+
896
+ type MDXComponentsBase = ComponentProps<typeof MDXProvider>['components'];
897
+
898
+ export type MDXComponentsObject = MDXComponentsBase & {
895
899
  readonly Head: typeof Head;
896
900
  readonly details: typeof MDXDetails;
897
901