@docusaurus/core 2.4.1 → 2.4.3

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
@@ -20,6 +20,7 @@ import SiteMetadataDefaults from './SiteMetadataDefaults';
20
20
  // TODO, quick fix for CSS insertion order
21
21
  // eslint-disable-next-line import/order
22
22
  import ErrorBoundary from '@docusaurus/ErrorBoundary';
23
+ import HasHydratedDataAttribute from './hasHydratedDataAttribute';
23
24
  export default function App() {
24
25
  const routeElement = renderRoutes(routes);
25
26
  const location = useLocation();
@@ -34,6 +35,7 @@ export default function App() {
34
35
  {routeElement}
35
36
  </PendingNavigation>
36
37
  </Root>
38
+ <HasHydratedDataAttribute />
37
39
  </BrowserContextProvider>
38
40
  </DocusaurusContextProvider>
39
41
  </ErrorBoundary>);
@@ -0,0 +1,8 @@
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
+ export default function HasHydratedDataAttribute(): JSX.Element;
@@ -0,0 +1,17 @@
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 React from 'react';
8
+ import Head from '@docusaurus/Head';
9
+ import useIsBrowser from '@docusaurus/useIsBrowser';
10
+ // See https://github.com/facebook/docusaurus/pull/9256
11
+ // Docusaurus adds a <html data-has-hydrated="true"> after hydration
12
+ export default function HasHydratedDataAttribute() {
13
+ const isBrowser = useIsBrowser();
14
+ return (<Head>
15
+ <html data-has-hydrated={isBrowser}/>
16
+ </Head>);
17
+ }
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": "2.4.1",
4
+ "version": "2.4.3",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,13 +43,13 @@
43
43
  "@babel/runtime": "^7.18.6",
44
44
  "@babel/runtime-corejs3": "^7.18.6",
45
45
  "@babel/traverse": "^7.18.8",
46
- "@docusaurus/cssnano-preset": "2.4.1",
47
- "@docusaurus/logger": "2.4.1",
48
- "@docusaurus/mdx-loader": "2.4.1",
46
+ "@docusaurus/cssnano-preset": "2.4.3",
47
+ "@docusaurus/logger": "2.4.3",
48
+ "@docusaurus/mdx-loader": "2.4.3",
49
49
  "@docusaurus/react-loadable": "5.5.2",
50
- "@docusaurus/utils": "2.4.1",
51
- "@docusaurus/utils-common": "2.4.1",
52
- "@docusaurus/utils-validation": "2.4.1",
50
+ "@docusaurus/utils": "2.4.3",
51
+ "@docusaurus/utils-common": "2.4.3",
52
+ "@docusaurus/utils-validation": "2.4.3",
53
53
  "@slorber/static-site-generator-webpack-plugin": "^4.0.7",
54
54
  "@svgr/webpack": "^6.2.1",
55
55
  "autoprefixer": "^10.4.7",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "2.4.1",
110
- "@docusaurus/types": "2.4.1",
109
+ "@docusaurus/module-type-aliases": "2.4.3",
110
+ "@docusaurus/types": "2.4.3",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/react-dom": "^18.0.6",
113
113
  "@types/react-router-config": "^5.0.6",
@@ -127,5 +127,5 @@
127
127
  "engines": {
128
128
  "node": ">=16.14"
129
129
  },
130
- "gitHead": "60e657d8ae5a4a9ed1c2d777f9defd882cc12681"
130
+ "gitHead": "56410aa94665699f75cb889f477ccdffb98f2b21"
131
131
  }