@docusaurus/theme-classic 3.10.1-canary-6610 → 3.10.1-canary-6612

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.
@@ -20,5 +20,6 @@ function getAdmonitionTypeComponent(type) {
20
20
  export default function Admonition(unprocessedProps) {
21
21
  const props = processAdmonitionProps(unprocessedProps);
22
22
  const AdmonitionTypeComponent = getAdmonitionTypeComponent(props.type);
23
+ // eslint-disable-next-line react-hooks/static-components
23
24
  return <AdmonitionTypeComponent {...props} />;
24
25
  }
@@ -16,7 +16,6 @@ export default function AnnouncementBarContent(props) {
16
16
  {...props}
17
17
  className={clsx(styles.content, props.className)}
18
18
  // Developer provided the HTML, so assume it's safe.
19
- // eslint-disable-next-line react/no-danger
20
19
  dangerouslySetInnerHTML={{__html: content}}
21
20
  />
22
21
  );
@@ -12,7 +12,7 @@ import {Highlight} from 'prism-react-renderer';
12
12
  import Line from '@theme/CodeBlock/Line';
13
13
  import styles from './styles.module.css';
14
14
  // TODO Docusaurus v4: remove useless forwardRef
15
- const Pre = React.forwardRef((props, ref) => {
15
+ const Pre = React.forwardRef(function Pre(props, ref) {
16
16
  return (
17
17
  <pre
18
18
  ref={ref}
@@ -19,7 +19,6 @@ export default function DocSidebarItemHtml({item, level, index}) {
19
19
  className,
20
20
  )}
21
21
  key={index}
22
- // eslint-disable-next-line react/no-danger
23
22
  dangerouslySetInnerHTML={{__html: value}}
24
23
  />
25
24
  );
@@ -10,7 +10,6 @@ export default function FooterCopyright({copyright}) {
10
10
  <div
11
11
  className="footer__copyright"
12
12
  // Developer provided the HTML, so assume it's safe.
13
- // eslint-disable-next-line react/no-danger
14
13
  dangerouslySetInnerHTML={{__html: copyright}}
15
14
  />
16
15
  );
@@ -13,7 +13,6 @@ function ColumnLinkItem({item}) {
13
13
  <li
14
14
  className={clsx('footer__item', item.className)}
15
15
  // Developer provided the HTML, so assume it's safe.
16
- // eslint-disable-next-line react/no-danger
17
16
  dangerouslySetInnerHTML={{__html: item.html}}
18
17
  />
19
18
  ) : (
@@ -15,7 +15,6 @@ function SimpleLinkItem({item}) {
15
15
  <span
16
16
  className={clsx('footer__link-item', item.className)}
17
17
  // Developer provided the HTML, so assume it's safe.
18
- // eslint-disable-next-line react/no-danger
19
18
  dangerouslySetInnerHTML={{__html: item.html}}
20
19
  />
21
20
  ) : (
@@ -18,10 +18,10 @@ export default function prismIncludeLanguages(PrismObject) {
18
18
  globalThis.Prism = PrismObject;
19
19
  additionalLanguages.forEach((lang) => {
20
20
  if (lang === 'php') {
21
- // eslint-disable-next-line global-require
21
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
22
22
  require('prismjs/components/prism-markup-templating.js');
23
23
  }
24
- // eslint-disable-next-line global-require, import/no-dynamic-require
24
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
25
25
  require(`prismjs/components/prism-${lang}`);
26
26
  });
27
27
  // Clean up and eventually restore former globalThis.Prism object (if any)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "3.10.1-canary-6610",
3
+ "version": "3.10.1-canary-6612",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -20,19 +20,19 @@
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "3.10.1-canary-6610",
24
- "@docusaurus/logger": "3.10.1-canary-6610",
25
- "@docusaurus/mdx-loader": "3.10.1-canary-6610",
26
- "@docusaurus/module-type-aliases": "3.10.1-canary-6610",
27
- "@docusaurus/plugin-content-blog": "3.10.1-canary-6610",
28
- "@docusaurus/plugin-content-docs": "3.10.1-canary-6610",
29
- "@docusaurus/plugin-content-pages": "3.10.1-canary-6610",
30
- "@docusaurus/theme-common": "3.10.1-canary-6610",
31
- "@docusaurus/theme-translations": "3.10.1-canary-6610",
32
- "@docusaurus/types": "3.10.1-canary-6610",
33
- "@docusaurus/utils": "3.10.1-canary-6610",
34
- "@docusaurus/utils-common": "3.10.1-canary-6610",
35
- "@docusaurus/utils-validation": "3.10.1-canary-6610",
23
+ "@docusaurus/core": "3.10.1-canary-6612",
24
+ "@docusaurus/logger": "3.10.1-canary-6612",
25
+ "@docusaurus/mdx-loader": "3.10.1-canary-6612",
26
+ "@docusaurus/module-type-aliases": "3.10.1-canary-6612",
27
+ "@docusaurus/plugin-content-blog": "3.10.1-canary-6612",
28
+ "@docusaurus/plugin-content-docs": "3.10.1-canary-6612",
29
+ "@docusaurus/plugin-content-pages": "3.10.1-canary-6612",
30
+ "@docusaurus/theme-common": "3.10.1-canary-6612",
31
+ "@docusaurus/theme-translations": "3.10.1-canary-6612",
32
+ "@docusaurus/types": "3.10.1-canary-6612",
33
+ "@docusaurus/utils": "3.10.1-canary-6612",
34
+ "@docusaurus/utils-common": "3.10.1-canary-6612",
35
+ "@docusaurus/utils-validation": "3.10.1-canary-6612",
36
36
  "@mdx-js/react": "^3.1.1",
37
37
  "clsx": "^2.0.0",
38
38
  "copy-text-to-clipboard": "^3.2.0",
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=24.14"
62
62
  },
63
- "gitHead": "0d5acb95facc8da12797122d99a202673d130b93"
63
+ "gitHead": "4d0d5252d3de5fa3ae601808796280171962535e"
64
64
  }
@@ -24,5 +24,6 @@ function getAdmonitionTypeComponent(type: string): ComponentType<Props> {
24
24
  export default function Admonition(unprocessedProps: Props): ReactNode {
25
25
  const props = processAdmonitionProps(unprocessedProps);
26
26
  const AdmonitionTypeComponent = getAdmonitionTypeComponent(props.type);
27
+ // eslint-disable-next-line react-hooks/static-components
27
28
  return <AdmonitionTypeComponent {...props} />;
28
29
  }
@@ -19,7 +19,6 @@ export default function AnnouncementBarContent(props: Props): ReactNode {
19
19
  {...props}
20
20
  className={clsx(styles.content, props.className)}
21
21
  // Developer provided the HTML, so assume it's safe.
22
- // eslint-disable-next-line react/no-danger
23
22
  dangerouslySetInnerHTML={{__html: content}}
24
23
  />
25
24
  );
@@ -17,7 +17,7 @@ import styles from './styles.module.css';
17
17
 
18
18
  // TODO Docusaurus v4: remove useless forwardRef
19
19
  const Pre = React.forwardRef<HTMLPreElement, ComponentProps<'pre'>>(
20
- (props, ref) => {
20
+ function Pre(props, ref) {
21
21
  return (
22
22
  <pre
23
23
  ref={ref}
@@ -27,7 +27,6 @@ export default function DocSidebarItemHtml({
27
27
  className,
28
28
  )}
29
29
  key={index}
30
- // eslint-disable-next-line react/no-danger
31
30
  dangerouslySetInnerHTML={{__html: value}}
32
31
  />
33
32
  );
@@ -13,7 +13,6 @@ export default function FooterCopyright({copyright}: Props): ReactNode {
13
13
  <div
14
14
  className="footer__copyright"
15
15
  // Developer provided the HTML, so assume it's safe.
16
- // eslint-disable-next-line react/no-danger
17
16
  dangerouslySetInnerHTML={{__html: copyright}}
18
17
  />
19
18
  );
@@ -19,7 +19,6 @@ function ColumnLinkItem({item}: {item: ColumnItemType}) {
19
19
  <li
20
20
  className={clsx('footer__item', item.className)}
21
21
  // Developer provided the HTML, so assume it's safe.
22
- // eslint-disable-next-line react/no-danger
23
22
  dangerouslySetInnerHTML={{__html: item.html}}
24
23
  />
25
24
  ) : (
@@ -19,7 +19,6 @@ function SimpleLinkItem({item}: {item: Props['links'][number]}) {
19
19
  <span
20
20
  className={clsx('footer__link-item', item.className)}
21
21
  // Developer provided the HTML, so assume it's safe.
22
- // eslint-disable-next-line react/no-danger
23
22
  dangerouslySetInnerHTML={{__html: item.html}}
24
23
  />
25
24
  ) : (
@@ -29,10 +29,10 @@ export default function prismIncludeLanguages(
29
29
 
30
30
  additionalLanguages.forEach((lang) => {
31
31
  if (lang === 'php') {
32
- // eslint-disable-next-line global-require
32
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
33
33
  require('prismjs/components/prism-markup-templating.js');
34
34
  }
35
- // eslint-disable-next-line global-require, import/no-dynamic-require
35
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
36
36
  require(`prismjs/components/prism-${lang}`);
37
37
  });
38
38
 
@@ -499,8 +499,7 @@ declare module '@theme/CodeBlock/Buttons/WordWrapButton' {
499
499
  }
500
500
 
501
501
  declare module '@theme/CodeBlock/Container' {
502
- import type {ReactNode} from 'react';
503
- import type {ComponentProps} from 'react';
502
+ import type {ReactNode, ComponentProps} from 'react';
504
503
 
505
504
  export default function CodeBlockContainer<T extends 'div' | 'pre'>({
506
505
  as: As,