@docusaurus/types 3.7.0-canary-6200 → 3.7.0-canary-6201

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.7.0-canary-6200",
3
+ "version": "3.7.0-canary-6201",
4
4
  "description": "Common types for Docusaurus packages.",
5
5
  "types": "./src/index.d.ts",
6
6
  "publishConfig": {
@@ -27,5 +27,5 @@
27
27
  "react": "^18.0.0 || ^19.0.0",
28
28
  "react-dom": "^18.0.0 || ^19.0.0"
29
29
  },
30
- "gitHead": "0fcaaf4f7747ba0367cf5474089365fd0ec0455f"
30
+ "gitHead": "a725f9f911c011198014536ce5d7049d0cefd46d"
31
31
  }
package/src/config.d.ts CHANGED
@@ -132,7 +132,16 @@ export type FasterConfig = {
132
132
  rspackBundler: boolean;
133
133
  };
134
134
 
135
+ export type FutureV4Config = {
136
+ removeLegacyPostBuildHeadAttribute: boolean;
137
+ };
138
+
135
139
  export type FutureConfig = {
140
+ /**
141
+ * Turns v4 future flags on
142
+ */
143
+ v4: FutureV4Config;
144
+
136
145
  experimental_faster: FasterConfig;
137
146
 
138
147
  experimental_storage: StorageConfig;
@@ -451,6 +460,7 @@ export type Config = Overwrite<
451
460
  future?: Overwrite<
452
461
  DeepPartial<FutureConfig>,
453
462
  {
463
+ v4?: boolean | FutureV4Config;
454
464
  experimental_faster?: boolean | FasterConfig;
455
465
  }
456
466
  >;
package/src/index.d.ts CHANGED
@@ -67,6 +67,7 @@ export {
67
67
  Validate,
68
68
  ValidationSchema,
69
69
  AllContent,
70
+ RouteBuildMetadata,
70
71
  ConfigureWebpackUtils,
71
72
  PostCssOptions,
72
73
  HtmlTagObject,
package/src/plugin.d.ts CHANGED
@@ -114,6 +114,12 @@ export type ConfigureWebpackResult = WebpackConfiguration & {
114
114
  };
115
115
  };
116
116
 
117
+ export type RouteBuildMetadata = {
118
+ // We'll add extra metadata on a case by case basis here
119
+ // For now the only need is our sitemap plugin to filter noindex pages
120
+ noIndex: boolean;
121
+ };
122
+
117
123
  export type Plugin<Content = unknown> = {
118
124
  name: string;
119
125
  loadContent?: () => Promise<Content> | Content;
@@ -129,7 +135,11 @@ export type Plugin<Content = unknown> = {
129
135
  postBuild?: (
130
136
  props: Props & {
131
137
  content: Content;
138
+ // TODO Docusaurus v4: remove old messy unserializable "head" API
139
+ // breaking change, replaced by routesBuildMetadata
140
+ // Reason: https://github.com/facebook/docusaurus/pull/10826
132
141
  head: {[location: string]: HelmetServerState};
142
+ routesBuildMetadata: {[location: string]: RouteBuildMetadata};
133
143
  },
134
144
  ) => Promise<void> | void;
135
145
  // TODO Docusaurus v4 ?