@docusaurus/theme-classic 3.8.0-canary-6338 → 3.8.0-canary-6340
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.
|
@@ -155,7 +155,11 @@ export default function DocSidebarItemCategory({
|
|
|
155
155
|
? (e) => {
|
|
156
156
|
onItemClick?.(item);
|
|
157
157
|
if (href) {
|
|
158
|
-
|
|
158
|
+
// When already on the category's page, we collapse it
|
|
159
|
+
// We don't use "isActive" because it would collapse the
|
|
160
|
+
// category even when we browse a children element
|
|
161
|
+
// See https://github.com/facebook/docusaurus/issues/11213
|
|
162
|
+
if (isCurrentPage) {
|
|
159
163
|
e.preventDefault();
|
|
160
164
|
updateCollapsed();
|
|
161
165
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "3.8.0-canary-
|
|
3
|
+
"version": "3.8.0-canary-6340",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -20,26 +20,26 @@
|
|
|
20
20
|
"copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@docusaurus/core": "3.8.0-canary-
|
|
24
|
-
"@docusaurus/logger": "3.8.0-canary-
|
|
25
|
-
"@docusaurus/mdx-loader": "3.8.0-canary-
|
|
26
|
-
"@docusaurus/module-type-aliases": "3.8.0-canary-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "3.8.0-canary-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "3.8.0-canary-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "3.8.0-canary-
|
|
30
|
-
"@docusaurus/theme-common": "3.8.0-canary-
|
|
31
|
-
"@docusaurus/theme-translations": "3.8.0-canary-
|
|
32
|
-
"@docusaurus/types": "3.8.0-canary-
|
|
33
|
-
"@docusaurus/utils": "3.8.0-canary-
|
|
34
|
-
"@docusaurus/utils-common": "3.8.0-canary-
|
|
35
|
-
"@docusaurus/utils-validation": "3.8.0-canary-
|
|
23
|
+
"@docusaurus/core": "3.8.0-canary-6340",
|
|
24
|
+
"@docusaurus/logger": "3.8.0-canary-6340",
|
|
25
|
+
"@docusaurus/mdx-loader": "3.8.0-canary-6340",
|
|
26
|
+
"@docusaurus/module-type-aliases": "3.8.0-canary-6340",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "3.8.0-canary-6340",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "3.8.0-canary-6340",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "3.8.0-canary-6340",
|
|
30
|
+
"@docusaurus/theme-common": "3.8.0-canary-6340",
|
|
31
|
+
"@docusaurus/theme-translations": "3.8.0-canary-6340",
|
|
32
|
+
"@docusaurus/types": "3.8.0-canary-6340",
|
|
33
|
+
"@docusaurus/utils": "3.8.0-canary-6340",
|
|
34
|
+
"@docusaurus/utils-common": "3.8.0-canary-6340",
|
|
35
|
+
"@docusaurus/utils-validation": "3.8.0-canary-6340",
|
|
36
36
|
"@mdx-js/react": "^3.0.0",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"copy-text-to-clipboard": "^3.2.0",
|
|
39
39
|
"infima": "0.2.0-alpha.45",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
41
|
"nprogress": "^0.2.0",
|
|
42
|
-
"postcss": "^8.4
|
|
42
|
+
"postcss": "^8.5.4",
|
|
43
43
|
"prism-react-renderer": "^2.3.0",
|
|
44
44
|
"prismjs": "^1.29.0",
|
|
45
45
|
"react-router-dom": "^5.3.4",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=18.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "1dd034ae3610b014ca1e2697d4a66b9844752d0b"
|
|
66
66
|
}
|
|
@@ -188,7 +188,11 @@ export default function DocSidebarItemCategory({
|
|
|
188
188
|
? (e) => {
|
|
189
189
|
onItemClick?.(item);
|
|
190
190
|
if (href) {
|
|
191
|
-
|
|
191
|
+
// When already on the category's page, we collapse it
|
|
192
|
+
// We don't use "isActive" because it would collapse the
|
|
193
|
+
// category even when we browse a children element
|
|
194
|
+
// See https://github.com/facebook/docusaurus/issues/11213
|
|
195
|
+
if (isCurrentPage) {
|
|
192
196
|
e.preventDefault();
|
|
193
197
|
updateCollapsed();
|
|
194
198
|
} else {
|