@docusaurus/core 0.0.0-4519 → 0.0.0-4521
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/client/App.js +12 -6
- package/lib/client/LinksCollector.js +1 -1
- package/lib/client/PendingNavigation.js +1 -1
- package/lib/client/baseUrlIssueBanner/BaseUrlIssueBanner.js +7 -5
- package/lib/client/clientEntry.js +3 -2
- package/lib/client/exports/BrowserOnly.js +1 -1
- package/lib/client/exports/ComponentCreator.js +1 -1
- package/lib/client/exports/Head.js +1 -1
- package/lib/client/exports/Interpolate.js +4 -3
- package/lib/client/exports/Link.js +4 -2
- package/lib/client/exports/browserContext.js +1 -1
- package/lib/client/exports/docusaurusContext.js +1 -1
- package/lib/client/serverEntry.js +7 -4
- package/lib/client/theme-fallback/Error/index.d.ts +11 -0
- package/lib/client/theme-fallback/Error/index.js +19 -28
- package/lib/client/theme-fallback/Layout/index.d.ts +11 -0
- package/lib/client/theme-fallback/Layout/index.js +10 -18
- package/lib/client/theme-fallback/Loading/index.d.ts +9 -0
- package/lib/client/theme-fallback/Loading/index.js +46 -114
- package/lib/client/theme-fallback/NotFound/index.d.ts +9 -0
- package/lib/client/theme-fallback/NotFound/index.js +8 -14
- package/lib/client/theme-fallback/Root/index.d.ts +11 -0
- package/lib/client/theme-fallback/Root/index.js +2 -4
- package/lib/server/configValidation.d.ts +1 -1
- package/lib/server/configValidation.js +2 -1
- package/package.json +10 -10
package/lib/client/App.js
CHANGED
|
@@ -17,11 +17,17 @@ import './client-lifecycles-dispatcher';
|
|
|
17
17
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
18
18
|
import Error from '@theme/Error';
|
|
19
19
|
function App() {
|
|
20
|
-
return (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return (<ErrorBoundary fallback={Error}>
|
|
21
|
+
<DocusaurusContextProvider>
|
|
22
|
+
<BrowserContextProvider>
|
|
23
|
+
<Root>
|
|
24
|
+
<BaseUrlIssueBanner />
|
|
25
|
+
<PendingNavigation routes={routes} delay={1000}>
|
|
26
|
+
{renderRoutes(routes)}
|
|
27
|
+
</PendingNavigation>
|
|
28
|
+
</Root>
|
|
29
|
+
</BrowserContextProvider>
|
|
30
|
+
</DocusaurusContextProvider>
|
|
31
|
+
</ErrorBoundary>);
|
|
26
32
|
}
|
|
27
33
|
export default App;
|
|
@@ -23,5 +23,5 @@ const Context = createContext({
|
|
|
23
23
|
});
|
|
24
24
|
export const useLinksCollector = () => useContext(Context);
|
|
25
25
|
export function ProvideLinksCollector({ children, linksCollector, }) {
|
|
26
|
-
return
|
|
26
|
+
return <Context.Provider value={linksCollector}>{children}</Context.Provider>;
|
|
27
27
|
}
|
|
@@ -92,7 +92,7 @@ class PendingNavigation extends React.Component {
|
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
94
|
const { children, location } = this.props;
|
|
95
|
-
return (
|
|
95
|
+
return (<Route location={normalizeLocation(location)} render={() => children}/>);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
export default withRouter(PendingNavigation);
|
|
@@ -67,10 +67,12 @@ function BaseUrlIssueBannerEnabled() {
|
|
|
67
67
|
useLayoutEffect(() => {
|
|
68
68
|
window[InsertBannerWindowAttribute] = false;
|
|
69
69
|
}, []);
|
|
70
|
-
return (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
return (<>
|
|
71
|
+
{!ExecutionEnvironment.canUseDOM && (<Head>
|
|
72
|
+
<script>{createInlineScript(baseUrl)}</script>
|
|
73
|
+
</Head>)}
|
|
74
|
+
<div id={BannerContainerId}/>
|
|
75
|
+
</>);
|
|
74
76
|
}
|
|
75
77
|
// We want to help the users with a bad baseUrl configuration (very common error)
|
|
76
78
|
// Help message is inlined, and hidden if JS or CSS is able to load
|
|
@@ -83,5 +85,5 @@ export default function BaseUrlIssueBanner() {
|
|
|
83
85
|
// returns true for the homepage during SRR
|
|
84
86
|
const isHomePage = pathname === baseUrl;
|
|
85
87
|
const enabled = baseUrlIssueBanner && isHomePage;
|
|
86
|
-
return enabled ?
|
|
88
|
+
return enabled ? <BaseUrlIssueBannerEnabled /> : null;
|
|
87
89
|
}
|
|
@@ -20,8 +20,9 @@ if (ExecutionEnvironment.canUseDOM) {
|
|
|
20
20
|
// Note that we also preload async component to avoid first-load loading screen.
|
|
21
21
|
const renderMethod = process.env.NODE_ENV === 'production' ? hydrate : render;
|
|
22
22
|
preload(routes, window.location.pathname).then(() => {
|
|
23
|
-
renderMethod(
|
|
24
|
-
|
|
23
|
+
renderMethod(<BrowserRouter>
|
|
24
|
+
<App />
|
|
25
|
+
</BrowserRouter>, document.getElementById('__docusaurus'));
|
|
25
26
|
});
|
|
26
27
|
// Webpack Hot Module Replacement API
|
|
27
28
|
if (module.hot) {
|
|
@@ -16,7 +16,7 @@ function BrowserOnly({ children, fallback, }) {
|
|
|
16
16
|
throw new Error(`Docusaurus error: The children of <BrowserOnly> must be a "render function", e.g. <BrowserOnly>{() => <span>{window.location.href}</span>}</BrowserOnly>.
|
|
17
17
|
Current type: ${isValidElement(children) ? 'React element' : typeof children}`);
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return <>{children()}</>;
|
|
20
20
|
}
|
|
21
21
|
return fallback || null;
|
|
22
22
|
}
|
|
@@ -69,7 +69,7 @@ function ComponentCreator(path, hash) {
|
|
|
69
69
|
});
|
|
70
70
|
const Component = loadedModules.component;
|
|
71
71
|
delete loadedModules.component;
|
|
72
|
-
return
|
|
72
|
+
return <Component {...loadedModules} {...props}/>;
|
|
73
73
|
},
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -44,9 +44,10 @@ export function interpolate(text, values) {
|
|
|
44
44
|
else {
|
|
45
45
|
return processedText.split(ValueFoundMarker).reduce((array, value, index) => [
|
|
46
46
|
...array,
|
|
47
|
-
React.
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
<React.Fragment key={index}>
|
|
48
|
+
{value}
|
|
49
|
+
{elements[index]}
|
|
50
|
+
</React.Fragment>,
|
|
50
51
|
], []);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -107,7 +107,9 @@ function Link({ isNavLink, to, href, activeClassName, isActive, 'data-noBrokenLi
|
|
|
107
107
|
}
|
|
108
108
|
return isRegularHtmlLink ? (
|
|
109
109
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
<a href={targetLink} {...(targetLinkUnprefixed &&
|
|
111
|
+
!isInternal && { target: '_blank', rel: 'noopener noreferrer' })} {...props}/>) : (<LinkComponent {...props} onMouseEnter={onMouseEnter} innerRef={handleRef} to={targetLink || ''}
|
|
112
|
+
// avoid "React does not recognize the `activeClassName` prop on a DOM element"
|
|
113
|
+
{...(isNavLink && { isActive, activeClassName })}/>);
|
|
112
114
|
}
|
|
113
115
|
export default Link;
|
|
@@ -17,5 +17,5 @@ export function BrowserContextProvider({ children, }) {
|
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
setIsBrowser(true);
|
|
19
19
|
}, []);
|
|
20
|
-
return
|
|
20
|
+
return <Context.Provider value={isBrowser}>{children}</Context.Provider>;
|
|
21
21
|
}
|
|
@@ -21,5 +21,5 @@ const contextValue = {
|
|
|
21
21
|
};
|
|
22
22
|
export const Context = React.createContext(contextValue);
|
|
23
23
|
export function DocusaurusContextProvider({ children, }) {
|
|
24
|
-
return
|
|
24
|
+
return <Context.Provider value={contextValue}>{children}</Context.Provider>;
|
|
25
25
|
}
|
|
@@ -54,10 +54,13 @@ async function doRender(locals) {
|
|
|
54
54
|
const modules = new Set();
|
|
55
55
|
const context = {};
|
|
56
56
|
const linksCollector = createStatefulLinksCollector();
|
|
57
|
-
const appHtml = ReactDOMServer.renderToString(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
const appHtml = ReactDOMServer.renderToString(<Loadable.Capture report={(moduleName) => modules.add(moduleName)}>
|
|
58
|
+
<StaticRouter location={location} context={context}>
|
|
59
|
+
<ProvideLinksCollector linksCollector={linksCollector}>
|
|
60
|
+
<App />
|
|
61
|
+
</ProvideLinksCollector>
|
|
62
|
+
</StaticRouter>
|
|
63
|
+
</Loadable.Capture>);
|
|
61
64
|
onLinksCollected(location, linksCollector.getCollectedLinks());
|
|
62
65
|
const helmet = Helmet.renderStatic();
|
|
63
66
|
const htmlAttributes = helmet.htmlAttributes.toString();
|
|
@@ -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
|
+
/// <reference types="@docusaurus/module-type-aliases" />
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
import type { Props } from '@theme/Error';
|
|
10
|
+
declare function Error({ error, tryAgain }: Props): JSX.Element;
|
|
11
|
+
export default Error;
|
|
@@ -4,44 +4,35 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import React from 'react';
|
|
9
8
|
import Layout from '@theme/Layout';
|
|
10
9
|
import ErrorBoundary from '@docusaurus/ErrorBoundary';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
width: '100%',
|
|
22
|
-
fontSize: '20px',
|
|
23
|
-
}}>
|
|
10
|
+
function ErrorDisplay({ error, tryAgain }) {
|
|
11
|
+
return (<div style={{
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
height: '50vh',
|
|
17
|
+
width: '100%',
|
|
18
|
+
fontSize: '20px',
|
|
19
|
+
}}>
|
|
24
20
|
<h1>This page crashed.</h1>
|
|
25
21
|
<p>{error.message}</p>
|
|
26
22
|
<button type="button" onClick={tryAgain}>
|
|
27
23
|
Try again
|
|
28
24
|
</button>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
25
|
+
</div>);
|
|
31
26
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
// Note: we display the original error here, not the error that we captured in this extra error boundary
|
|
39
|
-
fallback={() => <ErrorDisplay error={error} tryAgain={tryAgain} />}>
|
|
27
|
+
function Error({ error, tryAgain }) {
|
|
28
|
+
// We wrap the error in its own error boundary because the layout can actually throw too...
|
|
29
|
+
// Only the ErrorDisplay component is simple enough to be considered safe to never throw
|
|
30
|
+
return (<ErrorBoundary
|
|
31
|
+
// Note: we display the original error here, not the error that we captured in this extra error boundary
|
|
32
|
+
fallback={() => <ErrorDisplay error={error} tryAgain={tryAgain}/>}>
|
|
40
33
|
<Layout title="Page Error">
|
|
41
|
-
<ErrorDisplay error={error} tryAgain={tryAgain}
|
|
34
|
+
<ErrorDisplay error={error} tryAgain={tryAgain}/>
|
|
42
35
|
</Layout>
|
|
43
|
-
</ErrorBoundary>
|
|
44
|
-
);
|
|
36
|
+
</ErrorBoundary>);
|
|
45
37
|
}
|
|
46
|
-
|
|
47
38
|
export default Error;
|
|
@@ -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
|
+
/// <reference types="@docusaurus/module-type-aliases" />
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
import type { Props } from '@theme/Layout';
|
|
10
|
+
declare function Layout({ children, title, description }: Props): JSX.Element;
|
|
11
|
+
export default Layout;
|
|
@@ -4,31 +4,23 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import React from 'react';
|
|
9
8
|
import Head from '@docusaurus/Head';
|
|
10
9
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
11
10
|
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const faviconUrl = useBaseUrl(favicon);
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
11
|
+
function Layout({ children, title, description }) {
|
|
12
|
+
const context = useDocusaurusContext();
|
|
13
|
+
const { siteConfig } = context;
|
|
14
|
+
const { favicon, tagline, title: defaultTitle } = siteConfig;
|
|
15
|
+
const faviconUrl = useBaseUrl(favicon);
|
|
16
|
+
return (<>
|
|
21
17
|
<Head defaultTitle={`${defaultTitle}${tagline ? ` · ${tagline}` : ''}`}>
|
|
22
18
|
{title && <title>{`${title} · ${tagline}`}</title>}
|
|
23
|
-
{favicon && <link rel="icon" href={faviconUrl}
|
|
24
|
-
{description && <meta name="description" content={description}
|
|
25
|
-
{description && (
|
|
26
|
-
<meta property="og:description" content={description} />
|
|
27
|
-
)}
|
|
19
|
+
{favicon && <link rel="icon" href={faviconUrl}/>}
|
|
20
|
+
{description && <meta name="description" content={description}/>}
|
|
21
|
+
{description && (<meta property="og:description" content={description}/>)}
|
|
28
22
|
</Head>
|
|
29
23
|
{children}
|
|
30
|
-
</>
|
|
31
|
-
);
|
|
24
|
+
</>);
|
|
32
25
|
}
|
|
33
|
-
|
|
34
26
|
export default Layout;
|
|
@@ -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
|
+
/// <reference types="react" />
|
|
8
|
+
import type { LoadingComponentProps } from 'react-loadable';
|
|
9
|
+
export default function Loading({ error, retry, pastDelay, }: LoadingComponentProps): JSX.Element | null;
|
|
@@ -4,133 +4,65 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import React from 'react';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
maxWidth: '50%',
|
|
30
|
-
width: '100%',
|
|
31
|
-
}}>
|
|
8
|
+
export default function Loading({ error, retry, pastDelay, }) {
|
|
9
|
+
if (error) {
|
|
10
|
+
return (<div style={{
|
|
11
|
+
textAlign: 'center',
|
|
12
|
+
color: '#fff',
|
|
13
|
+
backgroundColor: '#fa383e',
|
|
14
|
+
borderColor: '#fa383e',
|
|
15
|
+
borderStyle: 'solid',
|
|
16
|
+
borderRadius: '0.25rem',
|
|
17
|
+
borderWidth: '1px',
|
|
18
|
+
boxSizing: 'border-box',
|
|
19
|
+
display: 'block',
|
|
20
|
+
padding: '1rem',
|
|
21
|
+
flex: '0 0 50%',
|
|
22
|
+
marginLeft: '25%',
|
|
23
|
+
marginRight: '25%',
|
|
24
|
+
marginTop: '5rem',
|
|
25
|
+
maxWidth: '50%',
|
|
26
|
+
width: '100%',
|
|
27
|
+
}}>
|
|
32
28
|
<p>{error.message}</p>
|
|
33
29
|
<div>
|
|
34
30
|
<button type="button" onClick={retry}>
|
|
35
31
|
Retry
|
|
36
32
|
</button>
|
|
37
33
|
</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
width: 128,
|
|
55
|
-
height: 110,
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
top: 'calc(100vh - 64%)',
|
|
58
|
-
}}
|
|
59
|
-
viewBox="0 0 45 45"
|
|
60
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
61
|
-
stroke="#61dafb">
|
|
62
|
-
<g
|
|
63
|
-
fill="none"
|
|
64
|
-
fillRule="evenodd"
|
|
65
|
-
transform="translate(1 1)"
|
|
66
|
-
strokeWidth="2">
|
|
34
|
+
</div>);
|
|
35
|
+
}
|
|
36
|
+
if (pastDelay) {
|
|
37
|
+
return (<div style={{
|
|
38
|
+
display: 'flex',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
height: '100vh',
|
|
42
|
+
}}>
|
|
43
|
+
<svg id="loader" style={{
|
|
44
|
+
width: 128,
|
|
45
|
+
height: 110,
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
top: 'calc(100vh - 64%)',
|
|
48
|
+
}} viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" stroke="#61dafb">
|
|
49
|
+
<g fill="none" fillRule="evenodd" transform="translate(1 1)" strokeWidth="2">
|
|
67
50
|
<circle cx="22" cy="22" r="6" strokeOpacity="0">
|
|
68
|
-
<animate
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
dur="3s"
|
|
72
|
-
values="6;22"
|
|
73
|
-
calcMode="linear"
|
|
74
|
-
repeatCount="indefinite"
|
|
75
|
-
/>
|
|
76
|
-
<animate
|
|
77
|
-
attributeName="stroke-opacity"
|
|
78
|
-
begin="1.5s"
|
|
79
|
-
dur="3s"
|
|
80
|
-
values="1;0"
|
|
81
|
-
calcMode="linear"
|
|
82
|
-
repeatCount="indefinite"
|
|
83
|
-
/>
|
|
84
|
-
<animate
|
|
85
|
-
attributeName="stroke-width"
|
|
86
|
-
begin="1.5s"
|
|
87
|
-
dur="3s"
|
|
88
|
-
values="2;0"
|
|
89
|
-
calcMode="linear"
|
|
90
|
-
repeatCount="indefinite"
|
|
91
|
-
/>
|
|
51
|
+
<animate attributeName="r" begin="1.5s" dur="3s" values="6;22" calcMode="linear" repeatCount="indefinite"/>
|
|
52
|
+
<animate attributeName="stroke-opacity" begin="1.5s" dur="3s" values="1;0" calcMode="linear" repeatCount="indefinite"/>
|
|
53
|
+
<animate attributeName="stroke-width" begin="1.5s" dur="3s" values="2;0" calcMode="linear" repeatCount="indefinite"/>
|
|
92
54
|
</circle>
|
|
93
55
|
<circle cx="22" cy="22" r="6" strokeOpacity="0">
|
|
94
|
-
<animate
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
dur="3s"
|
|
98
|
-
values="6;22"
|
|
99
|
-
calcMode="linear"
|
|
100
|
-
repeatCount="indefinite"
|
|
101
|
-
/>
|
|
102
|
-
<animate
|
|
103
|
-
attributeName="stroke-opacity"
|
|
104
|
-
begin="3s"
|
|
105
|
-
dur="3s"
|
|
106
|
-
values="1;0"
|
|
107
|
-
calcMode="linear"
|
|
108
|
-
repeatCount="indefinite"
|
|
109
|
-
/>
|
|
110
|
-
<animate
|
|
111
|
-
attributeName="stroke-width"
|
|
112
|
-
begin="3s"
|
|
113
|
-
dur="3s"
|
|
114
|
-
values="2;0"
|
|
115
|
-
calcMode="linear"
|
|
116
|
-
repeatCount="indefinite"
|
|
117
|
-
/>
|
|
56
|
+
<animate attributeName="r" begin="3s" dur="3s" values="6;22" calcMode="linear" repeatCount="indefinite"/>
|
|
57
|
+
<animate attributeName="stroke-opacity" begin="3s" dur="3s" values="1;0" calcMode="linear" repeatCount="indefinite"/>
|
|
58
|
+
<animate attributeName="stroke-width" begin="3s" dur="3s" values="2;0" calcMode="linear" repeatCount="indefinite"/>
|
|
118
59
|
</circle>
|
|
119
60
|
<circle cx="22" cy="22" r="8">
|
|
120
|
-
<animate
|
|
121
|
-
attributeName="r"
|
|
122
|
-
begin="0s"
|
|
123
|
-
dur="1.5s"
|
|
124
|
-
values="6;1;2;3;4;5;6"
|
|
125
|
-
calcMode="linear"
|
|
126
|
-
repeatCount="indefinite"
|
|
127
|
-
/>
|
|
61
|
+
<animate attributeName="r" begin="0s" dur="1.5s" values="6;1;2;3;4;5;6" calcMode="linear" repeatCount="indefinite"/>
|
|
128
62
|
</circle>
|
|
129
63
|
</g>
|
|
130
64
|
</svg>
|
|
131
|
-
</div>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return null;
|
|
65
|
+
</div>);
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
136
68
|
}
|
|
@@ -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
|
+
/// <reference types="react" />
|
|
8
|
+
declare function NotFound(): JSX.Element;
|
|
9
|
+
export default NotFound;
|
|
@@ -4,25 +4,19 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
import React from 'react';
|
|
9
8
|
import Layout from '@theme/Layout';
|
|
10
|
-
|
|
11
9
|
function NotFound() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
height: '50vh',
|
|
20
|
-
fontSize: '20px',
|
|
10
|
+
return (<Layout title="Page Not Found">
|
|
11
|
+
<div style={{
|
|
12
|
+
display: 'flex',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
height: '50vh',
|
|
16
|
+
fontSize: '20px',
|
|
21
17
|
}}>
|
|
22
18
|
<h1>Oops, page not found </h1>
|
|
23
19
|
</div>
|
|
24
|
-
</Layout>
|
|
25
|
-
);
|
|
20
|
+
</Layout>);
|
|
26
21
|
}
|
|
27
|
-
|
|
28
22
|
export default NotFound;
|
|
@@ -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 type { ReactNode } from 'react';
|
|
8
|
+
declare function Root({ children }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): ReactNode;
|
|
11
|
+
export default Root;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
7
|
// Wrapper at the very top of the app, that is applied constantly
|
|
9
8
|
// and does not depend on current route (unlike the layout)
|
|
10
9
|
//
|
|
@@ -12,8 +11,7 @@
|
|
|
12
11
|
// and these providers won't reset state when we navigate
|
|
13
12
|
//
|
|
14
13
|
// See https://github.com/facebook/docusaurus/issues/3919
|
|
15
|
-
function Root({children}) {
|
|
16
|
-
|
|
14
|
+
function Root({ children }) {
|
|
15
|
+
return children;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
export default Root;
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
import type { DocusaurusConfig, I18nConfig } from '@docusaurus/types';
|
|
8
8
|
import { Joi } from '@docusaurus/utils-validation';
|
|
9
9
|
export declare const DEFAULT_I18N_CONFIG: I18nConfig;
|
|
10
|
-
export declare const DEFAULT_CONFIG: Pick<DocusaurusConfig, 'i18n' | 'onBrokenLinks' | 'onBrokenMarkdownLinks' | 'onDuplicateRoutes' | 'plugins' | 'themes' | 'presets' | 'customFields' | 'themeConfig' | 'titleDelimiter' | 'noIndex' | 'baseUrlIssueBanner' | 'staticDirectories'>;
|
|
10
|
+
export declare const DEFAULT_CONFIG: Pick<DocusaurusConfig, 'i18n' | 'onBrokenLinks' | 'onBrokenMarkdownLinks' | 'onDuplicateRoutes' | 'plugins' | 'themes' | 'presets' | 'customFields' | 'themeConfig' | 'titleDelimiter' | 'noIndex' | 'tagline' | 'baseUrlIssueBanner' | 'staticDirectories'>;
|
|
11
11
|
export declare const ConfigSchema: Joi.ObjectSchema<any>;
|
|
12
12
|
export declare function validateConfig(config: Partial<DocusaurusConfig>): DocusaurusConfig;
|
|
@@ -29,6 +29,7 @@ exports.DEFAULT_CONFIG = {
|
|
|
29
29
|
themeConfig: {},
|
|
30
30
|
titleDelimiter: '|',
|
|
31
31
|
noIndex: false,
|
|
32
|
+
tagline: '',
|
|
32
33
|
baseUrlIssueBanner: true,
|
|
33
34
|
staticDirectories: [utils_1.STATIC_DIR_NAME],
|
|
34
35
|
};
|
|
@@ -143,7 +144,7 @@ exports.ConfigSchema = utils_validation_1.Joi.object({
|
|
|
143
144
|
type: utils_validation_1.Joi.string(),
|
|
144
145
|
}).unknown()),
|
|
145
146
|
clientModules: utils_validation_1.Joi.array().items(utils_validation_1.Joi.string()),
|
|
146
|
-
tagline: utils_validation_1.Joi.string().allow(''),
|
|
147
|
+
tagline: utils_validation_1.Joi.string().allow('').default(exports.DEFAULT_CONFIG.tagline),
|
|
147
148
|
titleDelimiter: utils_validation_1.Joi.string().default('|'),
|
|
148
149
|
noIndex: utils_validation_1.Joi.bool().default(false),
|
|
149
150
|
webpack: utils_validation_1.Joi.object({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/core",
|
|
3
3
|
"description": "Easy to Maintain Open Source Documentation Websites",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-4521",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@babel/runtime": "^7.16.3",
|
|
42
42
|
"@babel/runtime-corejs3": "^7.16.3",
|
|
43
43
|
"@babel/traverse": "^7.16.3",
|
|
44
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
45
|
-
"@docusaurus/logger": "0.0.0-
|
|
46
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
44
|
+
"@docusaurus/cssnano-preset": "0.0.0-4521",
|
|
45
|
+
"@docusaurus/logger": "0.0.0-4521",
|
|
46
|
+
"@docusaurus/mdx-loader": "0.0.0-4521",
|
|
47
47
|
"@docusaurus/react-loadable": "5.5.2",
|
|
48
|
-
"@docusaurus/utils": "0.0.0-
|
|
49
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
50
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
48
|
+
"@docusaurus/utils": "0.0.0-4521",
|
|
49
|
+
"@docusaurus/utils-common": "0.0.0-4521",
|
|
50
|
+
"@docusaurus/utils-validation": "0.0.0-4521",
|
|
51
51
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.0",
|
|
52
52
|
"@svgr/webpack": "^6.0.0",
|
|
53
53
|
"autoprefixer": "^10.3.5",
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"webpackbar": "^5.0.2"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
109
|
-
"@docusaurus/types": "0.0.0-
|
|
108
|
+
"@docusaurus/module-type-aliases": "0.0.0-4521",
|
|
109
|
+
"@docusaurus/types": "0.0.0-4521",
|
|
110
110
|
"@types/copy-webpack-plugin": "^8.0.1",
|
|
111
111
|
"@types/detect-port": "^1.3.0",
|
|
112
112
|
"@types/mini-css-extract-plugin": "^1.4.3",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"engines": {
|
|
130
130
|
"node": ">=14"
|
|
131
131
|
},
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "10eacaa44e87420d300c367fc5e1538c21485767"
|
|
133
133
|
}
|