@docusaurus/core 0.0.0-4750 → 0.0.0-4751
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.
|
@@ -9,7 +9,7 @@ import { Context } from '../routeContext';
|
|
|
9
9
|
export default function useRouteContext() {
|
|
10
10
|
const context = React.useContext(Context);
|
|
11
11
|
if (!context) {
|
|
12
|
-
throw new Error('Unexpected: no Docusaurus
|
|
12
|
+
throw new Error('Unexpected: no Docusaurus route context found');
|
|
13
13
|
}
|
|
14
14
|
return context;
|
|
15
15
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, { type ReactNode } from 'react';
|
|
8
|
-
import type { PluginRouteContext } from '@docusaurus/types';
|
|
8
|
+
import type { PluginRouteContext, RouteContext } from '@docusaurus/types';
|
|
9
9
|
export declare const Context: React.Context<PluginRouteContext | null>;
|
|
10
10
|
export declare function RouteContextProvider({ children, value, }: {
|
|
11
11
|
children: ReactNode;
|
|
12
|
-
value: PluginRouteContext | null;
|
|
12
|
+
value: PluginRouteContext | RouteContext | null;
|
|
13
13
|
}): JSX.Element;
|
|
@@ -9,10 +9,10 @@ export const Context = React.createContext(null);
|
|
|
9
9
|
function mergeContexts({ parent, value, }) {
|
|
10
10
|
if (!parent) {
|
|
11
11
|
if (!value) {
|
|
12
|
-
throw new Error('Unexpected: no Docusaurus
|
|
12
|
+
throw new Error('Unexpected: no Docusaurus route context found');
|
|
13
13
|
}
|
|
14
14
|
else if (!('plugin' in value)) {
|
|
15
|
-
throw new Error('Unexpected: Docusaurus
|
|
15
|
+
throw new Error('Unexpected: Docusaurus topmost route context has no `plugin` attribute');
|
|
16
16
|
}
|
|
17
17
|
return value;
|
|
18
18
|
}
|
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-4751",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@babel/runtime": "^7.17.8",
|
|
42
42
|
"@babel/runtime-corejs3": "^7.17.7",
|
|
43
43
|
"@babel/traverse": "^7.17.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-4751",
|
|
45
|
+
"@docusaurus/logger": "0.0.0-4751",
|
|
46
|
+
"@docusaurus/mdx-loader": "0.0.0-4751",
|
|
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-4751",
|
|
49
|
+
"@docusaurus/utils-common": "0.0.0-4751",
|
|
50
|
+
"@docusaurus/utils-validation": "0.0.0-4751",
|
|
51
51
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.1",
|
|
52
52
|
"@svgr/webpack": "^6.2.1",
|
|
53
53
|
"autoprefixer": "^10.4.4",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
110
|
-
"@docusaurus/types": "0.0.0-
|
|
109
|
+
"@docusaurus/module-type-aliases": "0.0.0-4751",
|
|
110
|
+
"@docusaurus/types": "0.0.0-4751",
|
|
111
111
|
"@types/detect-port": "^1.3.2",
|
|
112
112
|
"@types/nprogress": "^0.2.0",
|
|
113
113
|
"@types/react-dom": "^17.0.14",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"engines": {
|
|
129
129
|
"node": ">=14"
|
|
130
130
|
},
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "31dce3a6b7ba78c70754f80693c87a706d47500f"
|
|
132
132
|
}
|