@docusaurus/core 4.0.0-canary-6880 → 4.0.0-canary-6882

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.
Files changed (30) hide show
  1. package/lib/client/App.d.ts +1 -1
  2. package/lib/client/App.js +0 -1
  3. package/lib/client/BaseUrlIssueBanner/index.d.ts +1 -1
  4. package/lib/client/BaseUrlIssueBanner/index.js +0 -1
  5. package/lib/client/SiteMetadataDefaults.d.ts +1 -1
  6. package/lib/client/SiteMetadataDefaults.js +0 -1
  7. package/lib/client/clientEntry.js +1 -1
  8. package/lib/client/exports/BrowserOnly.js +1 -1
  9. package/lib/client/exports/ComponentCreator.js +0 -1
  10. package/lib/client/exports/Head.d.ts +1 -1
  11. package/lib/client/exports/Head.js +0 -1
  12. package/lib/client/exports/Link.js +1 -1
  13. package/lib/client/exports/Translate.d.ts +1 -1
  14. package/lib/client/exports/Translate.js +0 -1
  15. package/lib/client/hasHydratedDataAttribute.js +0 -1
  16. package/lib/client/serverEntry.js +0 -1
  17. package/lib/client/theme-fallback/Error/index.d.ts +1 -1
  18. package/lib/client/theme-fallback/Error/index.js +0 -3
  19. package/lib/client/theme-fallback/Layout/index.d.ts +1 -1
  20. package/lib/client/theme-fallback/Layout/index.js +0 -1
  21. package/lib/client/theme-fallback/Loading/index.d.ts +1 -1
  22. package/lib/client/theme-fallback/Loading/index.js +0 -3
  23. package/lib/client/theme-fallback/NotFound/index.d.ts +1 -1
  24. package/lib/client/theme-fallback/NotFound/index.js +0 -3
  25. package/lib/client/theme-fallback/Root/index.d.ts +1 -1
  26. package/lib/client/theme-fallback/Root/index.js +0 -1
  27. package/lib/client/theme-fallback/ThemeProvider/index.d.ts +1 -1
  28. package/lib/client/theme-fallback/ThemeProvider/index.js +0 -1
  29. package/lib/commands/swizzle/actions.js +2 -3
  30. package/package.json +13 -13
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import '@generated/client-modules';
9
9
  export default function App(): ReactNode;
package/lib/client/App.js CHANGED
@@ -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
- import React from 'react';
8
7
  import '@generated/client-modules';
9
8
  import routes from '@generated/routes';
10
9
  import { useLocation } from '@docusaurus/router';
@@ -4,7 +4,7 @@
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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import './styles.module.css';
9
9
  /**
10
10
  * We want to help the users with a bad baseUrl configuration (very common
@@ -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
- import React from 'react';
8
7
  import { useLocation } from '@docusaurus/router';
9
8
  import Head from '@docusaurus/Head';
10
9
  import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
@@ -4,5 +4,5 @@
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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  export default function SiteMetadataDefaults(): ReactNode;
@@ -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
- import React from 'react';
8
7
  import Head from '@docusaurus/Head';
9
8
  import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
10
9
  import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -4,7 +4,7 @@
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
- import React, { startTransition } from 'react';
7
+ import { startTransition } from 'react';
8
8
  import ReactDOM from 'react-dom/client';
9
9
  import { HelmetProvider } from 'react-helmet-async';
10
10
  import { BrowserRouter, HashRouter } from 'react-router-dom';
@@ -4,7 +4,7 @@
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
- import React, { Suspense, isValidElement, use } from 'react';
7
+ import { Suspense, isValidElement, use } from 'react';
8
8
  import { browser } from 'react-dom';
9
9
  function BrowserOnlyContent({ children }) {
10
10
  // On the server, this bails out to the closest Suspense boundary fallback
@@ -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
- import React from 'react';
8
7
  import Loadable from 'react-loadable';
9
8
  import routesChunkNames from '@generated/routesChunkNames';
10
9
  import registry from '@generated/registry';
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import type { Props } from '@docusaurus/Head';
9
9
  export default function Head(props: Props): ReactNode;
@@ -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
- import React from 'react';
8
7
  import { Helmet } from 'react-helmet-async';
9
8
  export default function Head(props) {
10
9
  return <Helmet {...props}/>;
@@ -4,7 +4,7 @@
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
- import React, { useCallback, useEffect, useImperativeHandle, useRef, } from 'react';
7
+ import { useCallback, useEffect, useImperativeHandle, useRef, } from 'react';
8
8
  import { NavLink, Link as RRLink } from 'react-router-dom';
9
9
  import { applyTrailingSlash } from '@docusaurus/utils-common';
10
10
  import useDocusaurusContext from './useDocusaurusContext';
@@ -4,7 +4,7 @@
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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import { type InterpolateValues } from '@docusaurus/Interpolate';
9
9
  import type { TranslateParam, TranslateProps } from '@docusaurus/Translate';
10
10
  export declare function translate<Str extends string>({ message, id }: TranslateParam<Str>, values?: InterpolateValues<Str, string | number>): string;
@@ -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
- import React from 'react';
8
7
  import { interpolate } from '@docusaurus/Interpolate';
9
8
  // Can't read it from context, due to exposing imperative API
10
9
  import codeTranslations from '@generated/codeTranslations';
@@ -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
- import React from 'react';
8
7
  import Head from '@docusaurus/Head';
9
8
  import useIsBrowser from '@docusaurus/useIsBrowser';
10
9
  // See https://github.com/facebook/docusaurus/pull/9256
@@ -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
- import React from 'react';
8
7
  import { StaticRouter } from 'react-router-dom';
9
8
  import { HelmetProvider } from 'react-helmet-async';
10
9
  import Loadable from 'react-loadable';
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import type { Props } from '@theme/Error';
9
9
  export default function Error({ error, tryAgain }: Props): ReactNode;
@@ -4,9 +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
- // Should we translate theme-fallback?
8
- /* eslint-disable @docusaurus/no-untranslated-text */
9
- import React from 'react';
10
7
  import Head from '@docusaurus/Head';
11
8
  import ErrorBoundary from '@docusaurus/ErrorBoundary';
12
9
  import { getErrorCausalChain } from '@docusaurus/utils-common';
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import type { Props } from '@theme/Layout';
9
9
  export default function Layout({ children }: Props): ReactNode;
@@ -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
- import React from 'react';
8
7
  export default function Layout({ children }) {
9
8
  return <>{children}</>;
10
9
  }
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import type { LoadingComponentProps } from 'react-loadable';
9
9
  export default function Loading({ error, retry, pastDelay, }: LoadingComponentProps): ReactNode;
@@ -4,9 +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
- // Should we translate theme-fallback?
8
- /* eslint-disable @docusaurus/no-untranslated-text */
9
- import React from 'react';
10
7
  export default function Loading({ error, retry, pastDelay, }) {
11
8
  if (error) {
12
9
  return (<div style={{
@@ -4,5 +4,5 @@
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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  export default function NotFound(): ReactNode;
@@ -4,9 +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
- // Should we translate theme-fallback?
8
- /* eslint-disable @docusaurus/no-untranslated-text */
9
- import React from 'react';
10
7
  import Head from '@docusaurus/Head';
11
8
  import Layout from '@theme/Layout';
12
9
  export default function NotFound() {
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import type { Props } from '@theme/Root';
9
9
  export default function Root({ children }: Props): ReactNode;
@@ -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
- import React from 'react';
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
  //
@@ -4,6 +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
- import { type ReactNode } from 'react';
7
+ import type { ReactNode } from 'react';
8
8
  import type { Props } from '@theme/ThemeProvider';
9
9
  export default function ThemeProvider({ children }: Props): ReactNode;
@@ -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
- import React from 'react';
8
7
  // Wrapper component expected to be implemented by a theme
9
8
  // Unlike <Layout>, it applies to all sites routes and never unmounts
10
9
  //
@@ -82,7 +82,7 @@ async function wrap({ siteDir, themePath, componentName: themeComponentName, typ
82
82
  await fs_extra_1.default.ensureDir(node_path_1.default.resolve(siteDir, utils_1.THEME_PATH));
83
83
  const toPath = node_path_1.default.resolve(siteDir, utils_1.THEME_PATH, wrapperFileName);
84
84
  const content = typescript
85
- ? `import React, {type ReactNode} from 'react';
85
+ ? `import type {ReactNode} from 'react';
86
86
  import ${componentName} from '@theme-${importType}/${themeComponentName}';
87
87
  import type ${componentName}Type from '@theme/${themeComponentName}';
88
88
  import type {WrapperProps} from '@docusaurus/types';
@@ -97,8 +97,7 @@ export default function ${wrapperComponentName}(props: Props): ReactNode {
97
97
  );
98
98
  }
99
99
  `
100
- : `import React from 'react';
101
- import ${componentName} from '@theme-${importType}/${themeComponentName}';
100
+ : `import ${componentName} from '@theme-${importType}/${themeComponentName}';
102
101
 
103
102
  export default function ${wrapperComponentName}(props) {
104
103
  return (
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": "4.0.0-canary-6880",
4
+ "version": "4.0.0-canary-6882",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -33,14 +33,14 @@
33
33
  "url": "https://github.com/facebook/docusaurus/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@docusaurus/babel": "4.0.0-canary-6880",
37
- "@docusaurus/bundler": "4.0.0-canary-6880",
38
- "@docusaurus/glob": "4.0.0-canary-6880",
39
- "@docusaurus/logger": "4.0.0-canary-6880",
40
- "@docusaurus/mdx-loader": "4.0.0-canary-6880",
41
- "@docusaurus/utils": "4.0.0-canary-6880",
42
- "@docusaurus/utils-common": "4.0.0-canary-6880",
43
- "@docusaurus/utils-validation": "4.0.0-canary-6880",
36
+ "@docusaurus/babel": "4.0.0-canary-6882",
37
+ "@docusaurus/bundler": "4.0.0-canary-6882",
38
+ "@docusaurus/glob": "4.0.0-canary-6882",
39
+ "@docusaurus/logger": "4.0.0-canary-6882",
40
+ "@docusaurus/mdx-loader": "4.0.0-canary-6882",
41
+ "@docusaurus/utils": "4.0.0-canary-6882",
42
+ "@docusaurus/utils-common": "4.0.0-canary-6882",
43
+ "@docusaurus/utils-validation": "4.0.0-canary-6882",
44
44
  "boxen": "^9.0.0",
45
45
  "cli-table3": "^0.6.5",
46
46
  "combine-promises": "^1.2.0",
@@ -73,8 +73,8 @@
73
73
  "webpack-merge": "^6.0.1"
74
74
  },
75
75
  "devDependencies": {
76
- "@docusaurus/module-type-aliases": "4.0.0-canary-6880",
77
- "@docusaurus/types": "4.0.0-canary-6880",
76
+ "@docusaurus/module-type-aliases": "4.0.0-canary-6882",
77
+ "@docusaurus/types": "4.0.0-canary-6882",
78
78
  "@total-typescript/shoehorn": "^0.1.2",
79
79
  "@types/escape-html": "^1.0.4",
80
80
  "@types/history": "^4.7.11",
@@ -88,7 +88,7 @@
88
88
  "utility-types": "^3.11.0"
89
89
  },
90
90
  "peerDependencies": {
91
- "@docusaurus/faster": "4.0.0-canary-6880",
91
+ "@docusaurus/faster": "4.0.0-canary-6882",
92
92
  "@mdx-js/react": "^3.1.1",
93
93
  "react": "^19.3.0",
94
94
  "react-dom": "^19.3.0"
@@ -101,5 +101,5 @@
101
101
  "engines": {
102
102
  "node": ">=24.21"
103
103
  },
104
- "gitHead": "1a9593cffbf29c065ddd5aac5f213a17dc69a261"
104
+ "gitHead": "0bed90b9358f5192abaefb30a37569d824d9236c"
105
105
  }