@docusaurus/theme-classic 0.0.0-4279 → 0.0.0-4281
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/theme/NavbarItem/DropdownNavbarItem.js +1 -2
- package/lib/theme-classic.d.ts +0 -12
- package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +1 -2
- package/lib-next/theme-classic.d.ts +0 -12
- package/package.json +12 -12
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +1 -2
- package/src/theme-classic.d.ts +0 -12
- package/lib/theme/hooks/useLocationHash.js +0 -28
- package/lib-next/theme/hooks/useLocationHash.js +0 -20
- package/src/theme/hooks/useLocationHash.ts +0 -25
|
@@ -58,7 +58,6 @@ function DropdownNavbarItemDesktop({
|
|
|
58
58
|
var _props$children;
|
|
59
59
|
|
|
60
60
|
const dropdownRef = (0, _react.useRef)(null);
|
|
61
|
-
const dropdownMenuRef = (0, _react.useRef)(null);
|
|
62
61
|
const [showDropdown, setShowDropdown] = (0, _react.useState)(false);
|
|
63
62
|
(0, _react.useEffect)(() => {
|
|
64
63
|
const handleClickOutside = event => {
|
|
@@ -88,7 +87,7 @@ function DropdownNavbarItemDesktop({
|
|
|
88
87
|
}}>
|
|
89
88
|
{(_props$children = props.children) !== null && _props$children !== void 0 ? _props$children : props.label}
|
|
90
89
|
</_DefaultNavbarItem.NavLink>
|
|
91
|
-
<ul
|
|
90
|
+
<ul className="dropdown__menu">
|
|
92
91
|
{items.map((childItemProps, i) => <_NavbarItem.default isDropdownItem onKeyDown={e => {
|
|
93
92
|
if (i === items.length - 1 && e.key === 'Tab') {
|
|
94
93
|
e.preventDefault();
|
package/lib/theme-classic.d.ts
CHANGED
|
@@ -202,18 +202,6 @@ declare module '@theme/hooks/useHideableNavbar' {
|
|
|
202
202
|
export default useHideableNavbar;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
declare module '@theme/hooks/useLocationHash' {
|
|
206
|
-
import type {Dispatch, SetStateAction} from 'react';
|
|
207
|
-
|
|
208
|
-
export type useLocationHashReturns = readonly [
|
|
209
|
-
string,
|
|
210
|
-
Dispatch<SetStateAction<string>>,
|
|
211
|
-
];
|
|
212
|
-
|
|
213
|
-
const useLocationHash: (initialHash: string) => useLocationHashReturns;
|
|
214
|
-
export default useLocationHash;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
205
|
declare module '@theme/hooks/useLockBodyScroll' {
|
|
218
206
|
const useLockBodyScroll: (lock?: boolean) => void;
|
|
219
207
|
export default useLockBodyScroll;
|
|
@@ -39,7 +39,6 @@ function containsActiveItems(items, localPathname) {
|
|
|
39
39
|
|
|
40
40
|
function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
41
41
|
const dropdownRef = useRef(null);
|
|
42
|
-
const dropdownMenuRef = useRef(null);
|
|
43
42
|
const [showDropdown, setShowDropdown] = useState(false);
|
|
44
43
|
useEffect(() => {
|
|
45
44
|
const handleClickOutside = (event) => {
|
|
@@ -77,7 +76,7 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
77
76
|
}}>
|
|
78
77
|
{props.children ?? props.label}
|
|
79
78
|
</NavLink>
|
|
80
|
-
<ul
|
|
79
|
+
<ul className="dropdown__menu">
|
|
81
80
|
{items.map((childItemProps, i) => (
|
|
82
81
|
<NavbarItem
|
|
83
82
|
isDropdownItem
|
|
@@ -202,18 +202,6 @@ declare module '@theme/hooks/useHideableNavbar' {
|
|
|
202
202
|
export default useHideableNavbar;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
declare module '@theme/hooks/useLocationHash' {
|
|
206
|
-
import type {Dispatch, SetStateAction} from 'react';
|
|
207
|
-
|
|
208
|
-
export type useLocationHashReturns = readonly [
|
|
209
|
-
string,
|
|
210
|
-
Dispatch<SetStateAction<string>>,
|
|
211
|
-
];
|
|
212
|
-
|
|
213
|
-
const useLocationHash: (initialHash: string) => useLocationHashReturns;
|
|
214
|
-
export default useLocationHash;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
205
|
declare module '@theme/hooks/useLockBodyScroll' {
|
|
218
206
|
const useLockBodyScroll: (lock?: boolean) => void;
|
|
219
207
|
export default useLockBodyScroll;
|
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-4281",
|
|
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-4281",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4281",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4281",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4281",
|
|
30
|
+
"@docusaurus/theme-common": "0.0.0-4281",
|
|
31
|
+
"@docusaurus/theme-translations": "0.0.0-4281",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-4281",
|
|
33
|
+
"@docusaurus/utils-validation": "0.0.0-4281",
|
|
34
34
|
"@mdx-js/mdx": "^1.6.21",
|
|
35
35
|
"@mdx-js/react": "^1.6.21",
|
|
36
36
|
"chalk": "^4.1.2",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"rtlcss": "^3.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
50
|
-
"@docusaurus/types": "0.0.0-
|
|
49
|
+
"@docusaurus/module-type-aliases": "0.0.0-4281",
|
|
50
|
+
"@docusaurus/types": "0.0.0-4281",
|
|
51
51
|
"@types/mdx-js__react": "^1.5.4",
|
|
52
52
|
"@types/parse-numeric-range": "^0.0.1",
|
|
53
53
|
"@types/rtlcss": "^3.1.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=14"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "a0020d6db26fec01f5205ba5920bd6a90e4c6c1a"
|
|
66
66
|
}
|
|
@@ -55,7 +55,6 @@ function DropdownNavbarItemDesktop({
|
|
|
55
55
|
...props
|
|
56
56
|
}: DesktopOrMobileNavBarItemProps) {
|
|
57
57
|
const dropdownRef = useRef<HTMLDivElement>(null);
|
|
58
|
-
const dropdownMenuRef = useRef<HTMLUListElement>(null);
|
|
59
58
|
const [showDropdown, setShowDropdown] = useState(false);
|
|
60
59
|
|
|
61
60
|
useEffect(() => {
|
|
@@ -98,7 +97,7 @@ function DropdownNavbarItemDesktop({
|
|
|
98
97
|
}}>
|
|
99
98
|
{props.children ?? props.label}
|
|
100
99
|
</NavLink>
|
|
101
|
-
<ul
|
|
100
|
+
<ul className="dropdown__menu">
|
|
102
101
|
{items.map((childItemProps, i) => (
|
|
103
102
|
<NavbarItem
|
|
104
103
|
isDropdownItem
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -202,18 +202,6 @@ declare module '@theme/hooks/useHideableNavbar' {
|
|
|
202
202
|
export default useHideableNavbar;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
declare module '@theme/hooks/useLocationHash' {
|
|
206
|
-
import type {Dispatch, SetStateAction} from 'react';
|
|
207
|
-
|
|
208
|
-
export type useLocationHashReturns = readonly [
|
|
209
|
-
string,
|
|
210
|
-
Dispatch<SetStateAction<string>>,
|
|
211
|
-
];
|
|
212
|
-
|
|
213
|
-
const useLocationHash: (initialHash: string) => useLocationHashReturns;
|
|
214
|
-
export default useLocationHash;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
205
|
declare module '@theme/hooks/useLockBodyScroll' {
|
|
218
206
|
const useLockBodyScroll: (lock?: boolean) => void;
|
|
219
207
|
export default useLockBodyScroll;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
function useLocationHash(initialHash) {
|
|
17
|
-
const [hash, setHash] = (0, _react.useState)(initialHash);
|
|
18
|
-
(0, _react.useEffect)(() => {
|
|
19
|
-
const handleHashChange = () => setHash(window.location.hash);
|
|
20
|
-
|
|
21
|
-
window.addEventListener('hashchange', handleHashChange);
|
|
22
|
-
return () => window.removeEventListener('hashchange', handleHashChange);
|
|
23
|
-
}, []);
|
|
24
|
-
return [hash, setHash];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var _default = useLocationHash;
|
|
28
|
-
exports.default = _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
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 {useState, useEffect} from 'react';
|
|
8
|
-
|
|
9
|
-
function useLocationHash(initialHash) {
|
|
10
|
-
const [hash, setHash] = useState(initialHash);
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const handleHashChange = () => setHash(window.location.hash);
|
|
13
|
-
|
|
14
|
-
window.addEventListener('hashchange', handleHashChange);
|
|
15
|
-
return () => window.removeEventListener('hashchange', handleHashChange);
|
|
16
|
-
}, []);
|
|
17
|
-
return [hash, setHash];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default useLocationHash;
|
|
@@ -1,25 +0,0 @@
|
|
|
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 {useState, useEffect} from 'react';
|
|
9
|
-
import type {useLocationHashReturns} from '@theme/hooks/useLocationHash';
|
|
10
|
-
|
|
11
|
-
function useLocationHash(initialHash: string): useLocationHashReturns {
|
|
12
|
-
const [hash, setHash] = useState(initialHash);
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
const handleHashChange = () => setHash(window.location.hash);
|
|
16
|
-
|
|
17
|
-
window.addEventListener('hashchange', handleHashChange);
|
|
18
|
-
|
|
19
|
-
return () => window.removeEventListener('hashchange', handleHashChange);
|
|
20
|
-
}, []);
|
|
21
|
-
|
|
22
|
-
return [hash, setHash];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export default useLocationHash;
|