@docusaurus/types 0.0.0-4631 → 0.0.0-4634
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/index.d.ts +18 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/types",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4634",
|
|
4
4
|
"description": "Common types for Docusaurus packages.",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"webpack": "^5.69.1",
|
|
24
24
|
"webpack-merge": "^5.8.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "a9c1b80843ee5d3ff082105885e5a7d7a3d44cb0"
|
|
27
27
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -316,13 +316,30 @@ export type LoadedPlugin<Content = unknown> = InitializedPlugin<Content> & {
|
|
|
316
316
|
readonly content: Content;
|
|
317
317
|
};
|
|
318
318
|
|
|
319
|
+
export type SwizzleAction = 'eject' | 'wrap';
|
|
320
|
+
export type SwizzleActionStatus = 'safe' | 'unsafe' | 'forbidden';
|
|
321
|
+
|
|
322
|
+
export type SwizzleComponentConfig = {
|
|
323
|
+
actions: Record<SwizzleAction, SwizzleActionStatus>;
|
|
324
|
+
description?: string;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export type SwizzleConfig = {
|
|
328
|
+
components: Record<string, SwizzleComponentConfig>;
|
|
329
|
+
// Other settings could be added here,
|
|
330
|
+
// For example: the ability to declare the config as exhaustive
|
|
331
|
+
// so that we can emit errors
|
|
332
|
+
};
|
|
333
|
+
|
|
319
334
|
export type PluginModule = {
|
|
320
335
|
<Options, Content>(context: LoadContext, options: Options):
|
|
321
336
|
| Plugin<Content>
|
|
322
337
|
| Promise<Plugin<Content>>;
|
|
323
338
|
validateOptions?: <T>(data: OptionValidationContext<T>) => T;
|
|
324
339
|
validateThemeConfig?: <T>(data: ThemeConfigValidationContext<T>) => T;
|
|
325
|
-
|
|
340
|
+
|
|
341
|
+
getSwizzleComponentList?: () => string[] | undefined; // TODO deprecate this one later
|
|
342
|
+
getSwizzleConfig?: () => SwizzleConfig | undefined;
|
|
326
343
|
};
|
|
327
344
|
|
|
328
345
|
export type ImportedPluginModule = PluginModule & {
|