@docusaurus/theme-classic 0.0.0-4700 → 0.0.0-4705
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-next/theme/BackToTopButton/index.js +1 -3
- package/lib-next/theme/BlogPostItem/index.js +4 -3
- package/lib-next/theme/ColorModeToggle/index.js +7 -5
- package/lib-next/theme/DocItem/index.js +1 -4
- package/lib-next/theme/DocPage/index.js +7 -10
- package/lib-next/theme/Heading/index.js +6 -4
- package/lib-next/theme/Navbar/index.js +13 -7
- package/lib-next/theme/TOCCollapsible/index.js +1 -3
- package/lib-next/theme/Tag/index.js +4 -4
- package/package.json +13 -13
- package/src/theme/BackToTopButton/index.tsx +1 -3
- package/src/theme/BlogPostItem/index.tsx +4 -3
- package/src/theme/ColorModeToggle/index.tsx +7 -5
- package/src/theme/DocItem/index.tsx +1 -4
- package/src/theme/DocPage/index.tsx +7 -10
- package/src/theme/Heading/index.tsx +6 -4
- package/src/theme/Navbar/index.tsx +13 -7
- package/src/theme/TOCCollapsible/index.tsx +1 -3
- package/src/theme/Tag/index.tsx +4 -4
|
@@ -120,9 +120,7 @@ export default function BackToTopButton() {
|
|
|
120
120
|
'clean-btn',
|
|
121
121
|
ThemeClassNames.common.backToTopButton,
|
|
122
122
|
styles.backToTopButton,
|
|
123
|
-
|
|
124
|
-
[styles.backToTopButtonShow]: show,
|
|
125
|
-
},
|
|
123
|
+
show && styles.backToTopButtonShow,
|
|
126
124
|
)}
|
|
127
125
|
type="button"
|
|
128
126
|
onClick={() => smoothScrollTop()}
|
|
@@ -112,9 +112,10 @@ export default function BlogPostItem(props) {
|
|
|
112
112
|
|
|
113
113
|
{(tagsExists || truncated) && (
|
|
114
114
|
<footer
|
|
115
|
-
className={clsx(
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
className={clsx(
|
|
116
|
+
'row docusaurus-mt-lg',
|
|
117
|
+
isBlogPostPage && styles.blogPostDetailsFull,
|
|
118
|
+
)}>
|
|
118
119
|
{tagsExists && (
|
|
119
120
|
<div
|
|
120
121
|
className={clsx('col', {
|
|
@@ -22,11 +22,13 @@ function ColorModeToggle({className, checked: defaultChecked, onChange}) {
|
|
|
22
22
|
}, [defaultChecked]);
|
|
23
23
|
return (
|
|
24
24
|
<div
|
|
25
|
-
className={clsx(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
className={clsx(
|
|
26
|
+
styles.toggle,
|
|
27
|
+
className,
|
|
28
|
+
checked && styles.toggleChecked,
|
|
29
|
+
focused && styles.toggleFocused,
|
|
30
|
+
!isBrowser && styles.toggleDisabled,
|
|
31
|
+
)}>
|
|
30
32
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
|
31
33
|
<div
|
|
32
34
|
className={styles.toggleButton}
|
|
@@ -52,10 +52,7 @@ export default function DocItem(props) {
|
|
|
52
52
|
/>
|
|
53
53
|
|
|
54
54
|
<div className="row">
|
|
55
|
-
<div
|
|
56
|
-
className={clsx('col', {
|
|
57
|
-
[styles.docItemCol]: !hideTableOfContents,
|
|
58
|
-
})}>
|
|
55
|
+
<div className={clsx('col', !hideTableOfContents && styles.docItemCol)}>
|
|
59
56
|
<DocVersionBanner />
|
|
60
57
|
<div className={styles.docItemContainer}>
|
|
61
58
|
<article>
|
|
@@ -57,9 +57,7 @@ function DocPageContent({
|
|
|
57
57
|
className={clsx(
|
|
58
58
|
ThemeClassNames.docs.docSidebarContainer,
|
|
59
59
|
styles.docSidebarContainer,
|
|
60
|
-
|
|
61
|
-
[styles.docSidebarContainerHidden]: hiddenSidebarContainer,
|
|
62
|
-
},
|
|
60
|
+
hiddenSidebarContainer && styles.docSidebarContainerHidden,
|
|
63
61
|
)}
|
|
64
62
|
onTransitionEnd={(e) => {
|
|
65
63
|
if (
|
|
@@ -109,17 +107,16 @@ function DocPageContent({
|
|
|
109
107
|
</aside>
|
|
110
108
|
)}
|
|
111
109
|
<main
|
|
112
|
-
className={clsx(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
className={clsx(
|
|
111
|
+
styles.docMainContainer,
|
|
112
|
+
(hiddenSidebarContainer || !sidebar) &&
|
|
113
|
+
styles.docMainContainerEnhanced,
|
|
114
|
+
)}>
|
|
116
115
|
<div
|
|
117
116
|
className={clsx(
|
|
118
117
|
'container padding-top--md padding-bottom--lg',
|
|
119
118
|
styles.docItemWrapper,
|
|
120
|
-
|
|
121
|
-
[styles.docItemWrapperEnhanced]: hiddenSidebarContainer,
|
|
122
|
-
},
|
|
119
|
+
hiddenSidebarContainer && styles.docItemWrapperEnhanced,
|
|
123
120
|
)}>
|
|
124
121
|
{children}
|
|
125
122
|
</div>
|
|
@@ -22,10 +22,12 @@ function AnchorHeading({as: As, id, ...props}) {
|
|
|
22
22
|
return (
|
|
23
23
|
<As
|
|
24
24
|
{...props}
|
|
25
|
-
className={clsx(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
className={clsx(
|
|
26
|
+
'anchor',
|
|
27
|
+
hideOnScroll
|
|
28
|
+
? styles.anchorWithHideOnScrollNavbar
|
|
29
|
+
: styles.anchorWithStickyNavbar,
|
|
30
|
+
)}
|
|
29
31
|
id={id}>
|
|
30
32
|
{props.children}
|
|
31
33
|
<a
|
|
@@ -220,13 +220,19 @@ export default function Navbar() {
|
|
|
220
220
|
return (
|
|
221
221
|
<nav
|
|
222
222
|
ref={navbarRef}
|
|
223
|
-
className={clsx(
|
|
224
|
-
'navbar
|
|
225
|
-
'navbar--
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
223
|
+
className={clsx(
|
|
224
|
+
'navbar',
|
|
225
|
+
'navbar--fixed-top',
|
|
226
|
+
hideOnScroll && [
|
|
227
|
+
styles.navbarHideable,
|
|
228
|
+
!isNavbarVisible && styles.navbarHidden,
|
|
229
|
+
],
|
|
230
|
+
{
|
|
231
|
+
'navbar--dark': style === 'dark',
|
|
232
|
+
'navbar--primary': style === 'primary',
|
|
233
|
+
'navbar-sidebar--show': mobileSidebar.shown,
|
|
234
|
+
},
|
|
235
|
+
)}>
|
|
230
236
|
<div className="navbar__inner">
|
|
231
237
|
<div className="navbar__items">
|
|
232
238
|
{(items?.length > 0 || activeDocPlugin) && (
|
|
@@ -13,10 +13,10 @@ export default function Tag(props) {
|
|
|
13
13
|
return (
|
|
14
14
|
<Link
|
|
15
15
|
href={permalink}
|
|
16
|
-
className={clsx(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
className={clsx(
|
|
17
|
+
styles.tag,
|
|
18
|
+
count ? styles.tagWithCount : styles.tagRegular,
|
|
19
|
+
)}>
|
|
20
20
|
{name}
|
|
21
21
|
{count && <span>{count}</span>}
|
|
22
22
|
</Link>
|
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-4705",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@docusaurus/core": "0.0.0-
|
|
25
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
28
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
30
|
-
"@docusaurus/utils": "0.0.0-
|
|
31
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
32
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
24
|
+
"@docusaurus/core": "0.0.0-4705",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4705",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4705",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4705",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4705",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4705",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4705",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4705",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4705",
|
|
33
33
|
"@mdx-js/react": "^1.6.22",
|
|
34
34
|
"clsx": "^1.1.1",
|
|
35
35
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"rtlcss": "^3.3.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
46
|
-
"@docusaurus/types": "0.0.0-
|
|
45
|
+
"@docusaurus/module-type-aliases": "0.0.0-4705",
|
|
46
|
+
"@docusaurus/types": "0.0.0-4705",
|
|
47
47
|
"@types/mdx-js__react": "^1.5.5",
|
|
48
48
|
"@types/prismjs": "^1.26.0",
|
|
49
49
|
"@types/rtlcss": "^3.1.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "6bf7b983d9b8de15c1dce1f1bdaa27dc0158c156"
|
|
63
63
|
}
|
|
@@ -132,9 +132,7 @@ export default function BackToTopButton(): JSX.Element {
|
|
|
132
132
|
'clean-btn',
|
|
133
133
|
ThemeClassNames.common.backToTopButton,
|
|
134
134
|
styles.backToTopButton,
|
|
135
|
-
|
|
136
|
-
[styles.backToTopButtonShow!]: show,
|
|
137
|
-
},
|
|
135
|
+
show && styles.backToTopButtonShow,
|
|
138
136
|
)}
|
|
139
137
|
type="button"
|
|
140
138
|
onClick={() => smoothScrollTop()}
|
|
@@ -112,9 +112,10 @@ export default function BlogPostItem(props: Props): JSX.Element {
|
|
|
112
112
|
|
|
113
113
|
{(tagsExists || truncated) && (
|
|
114
114
|
<footer
|
|
115
|
-
className={clsx(
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
className={clsx(
|
|
116
|
+
'row docusaurus-mt-lg',
|
|
117
|
+
isBlogPostPage && styles.blogPostDetailsFull,
|
|
118
|
+
)}>
|
|
118
119
|
{tagsExists && (
|
|
119
120
|
<div className={clsx('col', {'col--9': truncatedPost})}>
|
|
120
121
|
<TagsListInline tags={tags} />
|
|
@@ -31,11 +31,13 @@ function ColorModeToggle({
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<div
|
|
34
|
-
className={clsx(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
className={clsx(
|
|
35
|
+
styles.toggle,
|
|
36
|
+
className,
|
|
37
|
+
checked && styles.toggleChecked,
|
|
38
|
+
focused && styles.toggleFocused,
|
|
39
|
+
!isBrowser && styles.toggleDisabled,
|
|
40
|
+
)}>
|
|
39
41
|
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
|
40
42
|
<div
|
|
41
43
|
className={styles.toggleButton}
|
|
@@ -53,10 +53,7 @@ export default function DocItem(props: Props): JSX.Element {
|
|
|
53
53
|
<Seo {...{title, description, keywords, image}} />
|
|
54
54
|
|
|
55
55
|
<div className="row">
|
|
56
|
-
<div
|
|
57
|
-
className={clsx('col', {
|
|
58
|
-
[styles.docItemCol!]: !hideTableOfContents,
|
|
59
|
-
})}>
|
|
56
|
+
<div className={clsx('col', !hideTableOfContents && styles.docItemCol)}>
|
|
60
57
|
<DocVersionBanner />
|
|
61
58
|
<div className={styles.docItemContainer}>
|
|
62
59
|
<article>
|
|
@@ -70,9 +70,7 @@ function DocPageContent({
|
|
|
70
70
|
className={clsx(
|
|
71
71
|
ThemeClassNames.docs.docSidebarContainer,
|
|
72
72
|
styles.docSidebarContainer,
|
|
73
|
-
|
|
74
|
-
[styles.docSidebarContainerHidden!]: hiddenSidebarContainer,
|
|
75
|
-
},
|
|
73
|
+
hiddenSidebarContainer && styles.docSidebarContainerHidden,
|
|
76
74
|
)}
|
|
77
75
|
onTransitionEnd={(e) => {
|
|
78
76
|
if (
|
|
@@ -122,17 +120,16 @@ function DocPageContent({
|
|
|
122
120
|
</aside>
|
|
123
121
|
)}
|
|
124
122
|
<main
|
|
125
|
-
className={clsx(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
className={clsx(
|
|
124
|
+
styles.docMainContainer,
|
|
125
|
+
(hiddenSidebarContainer || !sidebar) &&
|
|
126
|
+
styles.docMainContainerEnhanced,
|
|
127
|
+
)}>
|
|
129
128
|
<div
|
|
130
129
|
className={clsx(
|
|
131
130
|
'container padding-top--md padding-bottom--lg',
|
|
132
131
|
styles.docItemWrapper,
|
|
133
|
-
|
|
134
|
-
[styles.docItemWrapperEnhanced!]: hiddenSidebarContainer,
|
|
135
|
-
},
|
|
132
|
+
hiddenSidebarContainer && styles.docItemWrapperEnhanced,
|
|
136
133
|
)}>
|
|
137
134
|
{children}
|
|
138
135
|
</div>
|
|
@@ -25,10 +25,12 @@ function AnchorHeading({as: As, id, ...props}: Props) {
|
|
|
25
25
|
return (
|
|
26
26
|
<As
|
|
27
27
|
{...props}
|
|
28
|
-
className={clsx(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
className={clsx(
|
|
29
|
+
'anchor',
|
|
30
|
+
hideOnScroll
|
|
31
|
+
? styles.anchorWithHideOnScrollNavbar
|
|
32
|
+
: styles.anchorWithStickyNavbar,
|
|
33
|
+
)}
|
|
32
34
|
id={id}>
|
|
33
35
|
{props.children}
|
|
34
36
|
<a
|
|
@@ -237,13 +237,19 @@ export default function Navbar(): JSX.Element {
|
|
|
237
237
|
return (
|
|
238
238
|
<nav
|
|
239
239
|
ref={navbarRef}
|
|
240
|
-
className={clsx(
|
|
241
|
-
'navbar
|
|
242
|
-
'navbar--
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
className={clsx(
|
|
241
|
+
'navbar',
|
|
242
|
+
'navbar--fixed-top',
|
|
243
|
+
hideOnScroll && [
|
|
244
|
+
styles.navbarHideable,
|
|
245
|
+
!isNavbarVisible && styles.navbarHidden,
|
|
246
|
+
],
|
|
247
|
+
{
|
|
248
|
+
'navbar--dark': style === 'dark',
|
|
249
|
+
'navbar--primary': style === 'primary',
|
|
250
|
+
'navbar-sidebar--show': mobileSidebar.shown,
|
|
251
|
+
},
|
|
252
|
+
)}>
|
|
247
253
|
<div className="navbar__inner">
|
|
248
254
|
<div className="navbar__items">
|
|
249
255
|
{(items?.length > 0 || activeDocPlugin) && (
|
package/src/theme/Tag/index.tsx
CHANGED
|
@@ -18,10 +18,10 @@ export default function Tag(props: Props): JSX.Element {
|
|
|
18
18
|
return (
|
|
19
19
|
<Link
|
|
20
20
|
href={permalink}
|
|
21
|
-
className={clsx(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
className={clsx(
|
|
22
|
+
styles.tag,
|
|
23
|
+
count ? styles.tagWithCount : styles.tagRegular,
|
|
24
|
+
)}>
|
|
25
25
|
{name}
|
|
26
26
|
{count && <span>{count}</span>}
|
|
27
27
|
</Link>
|