@docusaurus/types 3.7.0 → 3.8.0
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 +2 -2
- package/src/config.d.ts +13 -0
- package/src/index.d.ts +1 -0
- package/src/plugin.d.ts +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
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": "
|
|
30
|
+
"gitHead": "948d63c42fad0ba24b7b531a9deb6167e64dc845"
|
|
31
31
|
}
|
package/src/config.d.ts
CHANGED
|
@@ -130,9 +130,21 @@ export type FasterConfig = {
|
|
|
130
130
|
lightningCssMinimizer: boolean;
|
|
131
131
|
mdxCrossCompilerCache: boolean;
|
|
132
132
|
rspackBundler: boolean;
|
|
133
|
+
rspackPersistentCache: boolean;
|
|
134
|
+
ssgWorkerThreads: boolean;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type FutureV4Config = {
|
|
138
|
+
removeLegacyPostBuildHeadAttribute: boolean;
|
|
139
|
+
useCssCascadeLayers: boolean;
|
|
133
140
|
};
|
|
134
141
|
|
|
135
142
|
export type FutureConfig = {
|
|
143
|
+
/**
|
|
144
|
+
* Turns v4 future flags on
|
|
145
|
+
*/
|
|
146
|
+
v4: FutureV4Config;
|
|
147
|
+
|
|
136
148
|
experimental_faster: FasterConfig;
|
|
137
149
|
|
|
138
150
|
experimental_storage: StorageConfig;
|
|
@@ -451,6 +463,7 @@ export type Config = Overwrite<
|
|
|
451
463
|
future?: Overwrite<
|
|
452
464
|
DeepPartial<FutureConfig>,
|
|
453
465
|
{
|
|
466
|
+
v4?: boolean | FutureV4Config;
|
|
454
467
|
experimental_faster?: boolean | FasterConfig;
|
|
455
468
|
}
|
|
456
469
|
>;
|
package/src/index.d.ts
CHANGED
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 ?
|
|
@@ -140,7 +150,7 @@ export type Plugin<Content = unknown> = {
|
|
|
140
150
|
isServer: boolean,
|
|
141
151
|
configureWebpackUtils: ConfigureWebpackUtils,
|
|
142
152
|
content: Content,
|
|
143
|
-
) => ConfigureWebpackResult;
|
|
153
|
+
) => ConfigureWebpackResult | void;
|
|
144
154
|
configurePostCss?: (options: PostCssOptions) => PostCssOptions;
|
|
145
155
|
getThemePath?: () => string;
|
|
146
156
|
getTypeScriptThemePath?: () => string;
|