@docusaurus/theme-classic 3.7.0-canary-6287 → 3.7.0-canary-6292

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.
@@ -11,6 +11,7 @@ import styles from './styles.module.css';
11
11
  export default function Tag({permalink, label, count, description}) {
12
12
  return (
13
13
  <Link
14
+ rel="tag"
14
15
  href={permalink}
15
16
  title={description}
16
17
  className={clsx(
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ import type { Props } from '@theme/ThemeProvider/TitleFormatter';
9
+ export default function ThemeProviderTitleFormatter({ children, }: Props): ReactNode;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ import {TitleFormatterProvider} from '@docusaurus/theme-common/internal';
9
+ const formatter = (params) => {
10
+ // Add your own title formatting logic here!
11
+ return params.defaultFormatter(params);
12
+ };
13
+ export default function ThemeProviderTitleFormatter({children}) {
14
+ return (
15
+ <TitleFormatterProvider formatter={formatter}>
16
+ {children}
17
+ </TitleFormatterProvider>
18
+ );
19
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ import type { Props } from '@theme/ThemeProvider';
9
+ export default function ThemeProvider({ children }: Props): ReactNode;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ import TitleFormatterProvider from '@theme/ThemeProvider/TitleFormatter';
9
+ export default function ThemeProvider({children}) {
10
+ return <TitleFormatterProvider>{children}</TitleFormatterProvider>;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "3.7.0-canary-6287",
3
+ "version": "3.7.0-canary-6292",
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.7.0-canary-6287",
24
- "@docusaurus/logger": "3.7.0-canary-6287",
25
- "@docusaurus/mdx-loader": "3.7.0-canary-6287",
26
- "@docusaurus/module-type-aliases": "3.7.0-canary-6287",
27
- "@docusaurus/plugin-content-blog": "3.7.0-canary-6287",
28
- "@docusaurus/plugin-content-docs": "3.7.0-canary-6287",
29
- "@docusaurus/plugin-content-pages": "3.7.0-canary-6287",
30
- "@docusaurus/theme-common": "3.7.0-canary-6287",
31
- "@docusaurus/theme-translations": "3.7.0-canary-6287",
32
- "@docusaurus/types": "3.7.0-canary-6287",
33
- "@docusaurus/utils": "3.7.0-canary-6287",
34
- "@docusaurus/utils-common": "3.7.0-canary-6287",
35
- "@docusaurus/utils-validation": "3.7.0-canary-6287",
23
+ "@docusaurus/core": "3.7.0-canary-6292",
24
+ "@docusaurus/logger": "3.7.0-canary-6292",
25
+ "@docusaurus/mdx-loader": "3.7.0-canary-6292",
26
+ "@docusaurus/module-type-aliases": "3.7.0-canary-6292",
27
+ "@docusaurus/plugin-content-blog": "3.7.0-canary-6292",
28
+ "@docusaurus/plugin-content-docs": "3.7.0-canary-6292",
29
+ "@docusaurus/plugin-content-pages": "3.7.0-canary-6292",
30
+ "@docusaurus/theme-common": "3.7.0-canary-6292",
31
+ "@docusaurus/theme-translations": "3.7.0-canary-6292",
32
+ "@docusaurus/types": "3.7.0-canary-6292",
33
+ "@docusaurus/utils": "3.7.0-canary-6292",
34
+ "@docusaurus/utils-common": "3.7.0-canary-6292",
35
+ "@docusaurus/utils-validation": "3.7.0-canary-6292",
36
36
  "@mdx-js/react": "^3.0.0",
37
37
  "clsx": "^2.0.0",
38
38
  "copy-text-to-clipboard": "^3.2.0",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=18.0"
64
64
  },
65
- "gitHead": "502724c159643191da9f7cf8cad62b0c560812e1"
65
+ "gitHead": "202a6243823c4fdc0ae16d50fb72193fc1fd7d6a"
66
66
  }
@@ -20,6 +20,7 @@ export default function Tag({
20
20
  }: Props): ReactNode {
21
21
  return (
22
22
  <Link
23
+ rel="tag"
23
24
  href={permalink}
24
25
  title={description}
25
26
  className={clsx(
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import React, {type ComponentProps, type ReactNode} from 'react';
9
+ import {TitleFormatterProvider} from '@docusaurus/theme-common/internal';
10
+ import type {Props} from '@theme/ThemeProvider/TitleFormatter';
11
+
12
+ type FormatterProp = ComponentProps<typeof TitleFormatterProvider>['formatter'];
13
+
14
+ const formatter: FormatterProp = (params) => {
15
+ // Add your own title formatting logic here!
16
+ return params.defaultFormatter(params);
17
+ };
18
+
19
+ export default function ThemeProviderTitleFormatter({
20
+ children,
21
+ }: Props): ReactNode {
22
+ return (
23
+ <TitleFormatterProvider formatter={formatter}>
24
+ {children}
25
+ </TitleFormatterProvider>
26
+ );
27
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import React, {type ReactNode} from 'react';
9
+ import TitleFormatterProvider from '@theme/ThemeProvider/TitleFormatter';
10
+ import type {Props} from '@theme/ThemeProvider';
11
+
12
+ export default function ThemeProvider({children}: Props): ReactNode {
13
+ return <TitleFormatterProvider>{children}</TitleFormatterProvider>;
14
+ }
@@ -1569,6 +1569,17 @@ declare module '@theme/ThemedImage' {
1569
1569
  export default function ThemedImage(props: Props): ReactNode;
1570
1570
  }
1571
1571
 
1572
+ declare module '@theme/ThemeProvider/TitleFormatter' {
1573
+ import type {ReactNode} from 'react';
1574
+
1575
+ export interface Props {
1576
+ readonly children: ReactNode;
1577
+ }
1578
+ export default function ThemeProviderTitleFormatter({
1579
+ children,
1580
+ }: Props): ReactNode;
1581
+ }
1582
+
1572
1583
  declare module '@theme/Details' {
1573
1584
  import {Details, type DetailsProps} from '@docusaurus/theme-common/Details';
1574
1585