@docusaurus/core 0.0.0-4749 → 0.0.0-4752

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 CHANGED
@@ -7,8 +7,8 @@
7
7
  import React from 'react';
8
8
  import routes from '@generated/routes';
9
9
  import renderRoutes from './exports/renderRoutes';
10
- import { BrowserContextProvider } from './exports/browserContext';
11
- import { DocusaurusContextProvider } from './exports/docusaurusContext';
10
+ import { BrowserContextProvider } from './browserContext';
11
+ import { DocusaurusContextProvider } from './docusaurusContext';
12
12
  import PendingNavigation from './PendingNavigation';
13
13
  import BaseUrlIssueBanner from './baseUrlIssueBanner/BaseUrlIssueBanner';
14
14
  import SiteMetadataDefaults from './SiteMetadataDefaults';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { useContext } from 'react';
8
- import { Context } from './docusaurusContext';
8
+ import { Context } from '../docusaurusContext';
9
9
  export default function useDocusaurusContext() {
10
10
  return useContext(Context);
11
11
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { useContext } from 'react';
8
- import { Context } from './browserContext';
8
+ import { Context } from '../browserContext';
9
9
  export default function useIsBrowser() {
10
10
  return useContext(Context);
11
11
  }
@@ -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 parent/current route context found');
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 parent/current route context found');
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 parent route context has no plugin attribute');
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-4749",
4
+ "version": "0.0.0-4752",
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-4749",
45
- "@docusaurus/logger": "0.0.0-4749",
46
- "@docusaurus/mdx-loader": "0.0.0-4749",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4752",
45
+ "@docusaurus/logger": "0.0.0-4752",
46
+ "@docusaurus/mdx-loader": "0.0.0-4752",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4749",
49
- "@docusaurus/utils-common": "0.0.0-4749",
50
- "@docusaurus/utils-validation": "0.0.0-4749",
48
+ "@docusaurus/utils": "0.0.0-4752",
49
+ "@docusaurus/utils-common": "0.0.0-4752",
50
+ "@docusaurus/utils-validation": "0.0.0-4752",
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-4749",
110
- "@docusaurus/types": "0.0.0-4749",
109
+ "@docusaurus/module-type-aliases": "0.0.0-4752",
110
+ "@docusaurus/types": "0.0.0-4752",
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": "96260c807b7b650d6e1673e28920684f74920f46"
131
+ "gitHead": "72cc43f34a82fb5f5bfc89c8b3eada5119dc773b"
132
132
  }