@docusaurus/types 3.10.1-canary-6655 → 3.10.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/types",
3
- "version": "3.10.1-canary-6655",
3
+ "version": "3.10.2",
4
4
  "description": "Common types for Docusaurus packages.",
5
5
  "types": "./src/index.d.ts",
6
6
  "publishConfig": {
@@ -13,20 +13,20 @@
13
13
  },
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@mdx-js/mdx": "^3.1.1",
16
+ "@mdx-js/mdx": "^3.0.0",
17
17
  "@types/history": "^4.7.11",
18
18
  "@types/mdast": "^4.0.2",
19
- "@types/react": "19.2.14",
19
+ "@types/react": "*",
20
20
  "commander": "^5.1.0",
21
- "joi": "^18.1.2",
21
+ "joi": "^17.9.2",
22
22
  "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0",
23
23
  "utility-types": "^3.10.0",
24
- "webpack": "^5.106.2",
25
- "webpack-merge": "^6.0.1"
24
+ "webpack": "^5.95.0",
25
+ "webpack-merge": "^5.9.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "react": "^19.2.0",
29
- "react-dom": "^19.2.0"
28
+ "react": "^18.0.0 || ^19.0.0",
29
+ "react-dom": "^18.0.0 || ^19.0.0"
30
30
  },
31
- "gitHead": "6e93a3055178dd0af922ba627f787229dcdf948b"
31
+ "gitHead": "f37f9035584917a97a260b91fc2842cba4f8b94f"
32
32
  }
package/src/config.d.ts CHANGED
@@ -37,6 +37,7 @@ export type FasterConfig = {
37
37
  };
38
38
 
39
39
  export type FutureV4Config = {
40
+ removeLegacyPostBuildHeadAttribute: boolean;
40
41
  useCssCascadeLayers: boolean;
41
42
  siteStorageNamespacing: boolean;
42
43
  fasterByDefault: boolean;
package/src/plugin.d.ts CHANGED
@@ -10,6 +10,7 @@ import type {RuleSetRule, Configuration as WebpackConfiguration} from 'webpack';
10
10
  import type {CustomizeRuleString} from 'webpack-merge/dist/types';
11
11
  import type {CommanderStatic} from 'commander';
12
12
  import type Joi from 'joi';
13
+ import type {HelmetServerState} from 'react-helmet-async';
13
14
  import type {ThemeConfig} from './config';
14
15
  import type {LoadContext, Props} from './context';
15
16
  import type {SwizzleConfig} from './swizzle';
@@ -136,6 +137,10 @@ export type Plugin<Content = unknown> = {
136
137
  postBuild?: (
137
138
  props: Props & {
138
139
  content: Content;
140
+ // TODO Docusaurus v4: remove old messy unserializable "head" API
141
+ // breaking change, replaced by routesBuildMetadata
142
+ // Reason: https://github.com/facebook/docusaurus/pull/10826
143
+ head: {[location: string]: HelmetServerState};
139
144
  routesBuildMetadata: {[location: string]: RouteBuildMetadata};
140
145
  },
141
146
  ) => Promise<void> | void;
@@ -203,10 +208,10 @@ export type LoadedPlugin = InitializedPlugin & {
203
208
  };
204
209
 
205
210
  export type PluginModule<Content = unknown> = {
206
- (
207
- context: LoadContext,
208
- options: unknown,
209
- ): Plugin<Content> | null | Promise<Plugin<Content> | null>;
211
+ (context: LoadContext, options: unknown):
212
+ | Plugin<Content>
213
+ | null
214
+ | Promise<Plugin<Content> | null>;
210
215
 
211
216
  validateOptions?: <T, U>(data: OptionValidationContext<T, U>) => U;
212
217
  validateThemeConfig?: <T>(data: ThemeConfigValidationContext<T>) => T;
package/src/swizzle.d.ts CHANGED
@@ -32,11 +32,12 @@ export type SwizzleConfig = {
32
32
  export type WrapperProps<
33
33
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
34
  T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>,
35
- > =
36
- T extends JSXElementConstructor<infer P>
37
- ? unknown extends P
38
- ? {}
39
- : P
40
- : T extends keyof JSX.IntrinsicElements
41
- ? JSX.IntrinsicElements[T]
42
- : {};
35
+ > = T extends JSXElementConstructor<infer P>
36
+ ? unknown extends P
37
+ ? // eslint-disable-next-line @typescript-eslint/ban-types
38
+ {}
39
+ : P
40
+ : T extends keyof JSX.IntrinsicElements
41
+ ? JSX.IntrinsicElements[T]
42
+ : // eslint-disable-next-line @typescript-eslint/ban-types
43
+ {};