@docusaurus/theme-classic 0.0.0-4435 → 0.0.0-4436
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/index.js
CHANGED
|
@@ -101,8 +101,7 @@ function getInfimaCSSFile(direction) {
|
|
|
101
101
|
return `infima/dist/css/default/default${direction === 'rtl' ? '-rtl' : ''}.css`;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
function docusaurusThemeClassic(context,
|
|
105
|
-
options) {
|
|
104
|
+
function docusaurusThemeClassic(context, options) {
|
|
106
105
|
const {
|
|
107
106
|
siteConfig: {
|
|
108
107
|
themeConfig: roughlyTypedThemeConfig
|
|
@@ -37,9 +37,9 @@ export default function CodeBlock({
|
|
|
37
37
|
|
|
38
38
|
useEffect(() => {
|
|
39
39
|
setMounted(true);
|
|
40
|
-
}, []); //
|
|
41
|
-
//
|
|
42
|
-
//
|
|
40
|
+
}, []); // We still parse the metastring in case we want to support more syntax in the
|
|
41
|
+
// future. Note that MDX doesn't strip quotes when parsing metastring:
|
|
42
|
+
// "title=\"xyz\"" => title: "\"xyz\""
|
|
43
43
|
|
|
44
44
|
const codeBlockTitle = parseCodeBlockTitle(metastring) || title;
|
|
45
45
|
const prismTheme = usePrismTheme(); // <pre> tags in markdown map to CodeBlocks and they may contain JSX children.
|
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-4436",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
31
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4436",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4436",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4436",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4436",
|
|
30
|
+
"@docusaurus/theme-common": "0.0.0-4436",
|
|
31
|
+
"@docusaurus/theme-translations": "0.0.0-4436",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-4436",
|
|
33
|
+
"@docusaurus/utils-validation": "0.0.0-4436",
|
|
34
34
|
"@mdx-js/mdx": "^1.6.21",
|
|
35
35
|
"@mdx-js/react": "^1.6.21",
|
|
36
36
|
"clsx": "^1.1.1",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"rtlcss": "^3.3.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
49
|
-
"@docusaurus/types": "0.0.0-
|
|
48
|
+
"@docusaurus/module-type-aliases": "0.0.0-4436",
|
|
49
|
+
"@docusaurus/types": "0.0.0-4436",
|
|
50
50
|
"@types/mdx-js__react": "^1.5.4",
|
|
51
51
|
"@types/parse-numeric-range": "^0.0.1",
|
|
52
52
|
"@types/rtlcss": "^3.1.1",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=14"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3b2e15935a716c69bd530fe10942e1620b36ddc4"
|
|
65
65
|
}
|
package/src/index.ts
CHANGED
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {
|
|
9
|
-
DocusaurusContext,
|
|
10
|
-
Plugin,
|
|
11
|
-
PostCssOptions,
|
|
12
|
-
} from '@docusaurus/types';
|
|
8
|
+
import type {LoadContext, Plugin, PostCssOptions} from '@docusaurus/types';
|
|
13
9
|
import type {ThemeConfig} from '@docusaurus/theme-common';
|
|
14
10
|
import {getTranslationFiles, translateThemeConfig} from './translations';
|
|
15
11
|
import path from 'path';
|
|
@@ -95,7 +91,7 @@ function getInfimaCSSFile(direction: string) {
|
|
|
95
91
|
}
|
|
96
92
|
|
|
97
93
|
export default function docusaurusThemeClassic(
|
|
98
|
-
context:
|
|
94
|
+
context: LoadContext,
|
|
99
95
|
options: Options,
|
|
100
96
|
): Plugin<void> {
|
|
101
97
|
const {
|
|
@@ -44,9 +44,9 @@ export default function CodeBlock({
|
|
|
44
44
|
setMounted(true);
|
|
45
45
|
}, []);
|
|
46
46
|
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
47
|
+
// We still parse the metastring in case we want to support more syntax in the
|
|
48
|
+
// future. Note that MDX doesn't strip quotes when parsing metastring:
|
|
49
|
+
// "title=\"xyz\"" => title: "\"xyz\""
|
|
50
50
|
const codeBlockTitle = parseCodeBlockTitle(metastring) || title;
|
|
51
51
|
const prismTheme = usePrismTheme();
|
|
52
52
|
|
|
@@ -16,7 +16,7 @@ import type {Types, Props} from '@theme/NavbarItem';
|
|
|
16
16
|
|
|
17
17
|
const NavbarItemComponents: Record<
|
|
18
18
|
Exclude<Types, undefined>,
|
|
19
|
-
//
|
|
19
|
+
// Not really worth typing, as we pass all props down immediately
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
21
|
() => (props: any) => JSX.Element
|
|
22
22
|
> = {
|