@docusaurus/types 0.0.0-5932 → 0.0.0-5936
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 +15 -0
- package/src/context.d.ts +24 -0
- package/src/index.d.ts +3 -0
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-5936",
|
|
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",
|
|
28
28
|
"react-dom": "^18.0.0"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "81d636811c314ae20dff95589df890d8bfe1b574"
|
|
31
31
|
}
|
package/src/config.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import type {SiteStorage} from './context';
|
|
8
9
|
import type {RuleSetRule} from 'webpack';
|
|
9
10
|
import type {Required as RequireKeys, DeepPartial} from 'utility-types';
|
|
10
11
|
import type {I18nConfig} from './i18n';
|
|
@@ -115,6 +116,15 @@ export type MarkdownConfig = {
|
|
|
115
116
|
anchors: MarkdownAnchorsConfig;
|
|
116
117
|
};
|
|
117
118
|
|
|
119
|
+
export type StorageConfig = {
|
|
120
|
+
type: SiteStorage['type'];
|
|
121
|
+
namespace: boolean | string;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export type FutureConfig = {
|
|
125
|
+
experimental_storage: StorageConfig;
|
|
126
|
+
};
|
|
127
|
+
|
|
118
128
|
/**
|
|
119
129
|
* Docusaurus config, after validation/normalization.
|
|
120
130
|
*/
|
|
@@ -171,6 +181,11 @@ export type DocusaurusConfig = {
|
|
|
171
181
|
* @see https://docusaurus.io/docs/api/docusaurus-config#i18n
|
|
172
182
|
*/
|
|
173
183
|
i18n: I18nConfig;
|
|
184
|
+
/**
|
|
185
|
+
* Docusaurus future flags and experimental features.
|
|
186
|
+
* Similar to Remix future flags, see https://remix.run/blog/future-flags
|
|
187
|
+
*/
|
|
188
|
+
future: FutureConfig;
|
|
174
189
|
/**
|
|
175
190
|
* This option adds `<meta name="robots" content="noindex, nofollow">` to
|
|
176
191
|
* every page to tell search engines to avoid indexing your site.
|
package/src/context.d.ts
CHANGED
|
@@ -27,6 +27,25 @@ export type SiteMetadata = {
|
|
|
27
27
|
readonly pluginVersions: {[pluginName: string]: PluginVersionInformation};
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
export type SiteStorage = {
|
|
31
|
+
/**
|
|
32
|
+
* Which browser storage do you want to use?
|
|
33
|
+
* Between "localStorage" and "sessionStorage".
|
|
34
|
+
* The default is "localStorage".
|
|
35
|
+
*/
|
|
36
|
+
type: 'localStorage' | 'sessionStorage';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Applies a namespace to the theme storage key
|
|
40
|
+
* For readability, the namespace is applied at the end of the key
|
|
41
|
+
* The final storage key will be = `${key}${namespace}`
|
|
42
|
+
*
|
|
43
|
+
* The default namespace is "" for retro-compatibility reasons
|
|
44
|
+
* If you want a separator, the namespace should contain it ("-myNamespace")
|
|
45
|
+
*/
|
|
46
|
+
namespace: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
30
49
|
export type GlobalData = {[pluginName: string]: {[pluginId: string]: unknown}};
|
|
31
50
|
|
|
32
51
|
export type LoadContext = {
|
|
@@ -50,6 +69,11 @@ export type LoadContext = {
|
|
|
50
69
|
baseUrl: string;
|
|
51
70
|
i18n: I18n;
|
|
52
71
|
codeTranslations: CodeTranslations;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Defines the default browser storage behavior for a site
|
|
75
|
+
*/
|
|
76
|
+
siteStorage: SiteStorage;
|
|
53
77
|
};
|
|
54
78
|
|
|
55
79
|
export type Props = LoadContext & {
|
package/src/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export {
|
|
|
12
12
|
DefaultParseFrontMatter,
|
|
13
13
|
ParseFrontMatter,
|
|
14
14
|
DocusaurusConfig,
|
|
15
|
+
FutureConfig,
|
|
16
|
+
StorageConfig,
|
|
15
17
|
Config,
|
|
16
18
|
} from './config';
|
|
17
19
|
|
|
@@ -20,6 +22,7 @@ export {
|
|
|
20
22
|
DocusaurusContext,
|
|
21
23
|
GlobalData,
|
|
22
24
|
LoadContext,
|
|
25
|
+
SiteStorage,
|
|
23
26
|
Props,
|
|
24
27
|
} from './context';
|
|
25
28
|
|