@vuepress/shared 2.0.0-beta.53 → 2.0.0-beta.54
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/dist/index.d.ts +12 -12
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,25 +4,25 @@ export { isArray, isFunction, isString } from '@vue/shared';
|
|
|
4
4
|
/**
|
|
5
5
|
* Config for `<head>` tags
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
type HeadConfig = [HeadTagEmpty, HeadAttrsConfig] | [HeadTagNonEmpty, HeadAttrsConfig, string];
|
|
8
8
|
/**
|
|
9
9
|
* Allowed tags in `<head>`
|
|
10
10
|
*
|
|
11
11
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
type HeadTag = HeadTagNonEmpty | HeadTagEmpty;
|
|
14
14
|
/**
|
|
15
15
|
* Non-empty tags in `<head>`
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
type HeadTagNonEmpty = 'title' | 'style' | 'script' | 'noscript' | 'template';
|
|
18
18
|
/**
|
|
19
19
|
* Empty tags in `<head>`
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
type HeadTagEmpty = 'base' | 'link' | 'meta' | 'script';
|
|
22
22
|
/**
|
|
23
23
|
* Attributes to be set for tags in `<head>`
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
type HeadAttrsConfig = Record<string, string | boolean>;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Locales config, a key-value object
|
|
@@ -32,16 +32,16 @@ declare type HeadAttrsConfig = Record<string, string | boolean>;
|
|
|
32
32
|
*
|
|
33
33
|
* @remark suffix `Config` means this is for user config
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
type LocaleConfig<T extends LocaleData = LocaleData> = Record<string, Partial<T>>;
|
|
36
36
|
/**
|
|
37
37
|
* Locales data
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
type LocaleData = Record<never, never>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Base type of vuepress page
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
type PageBase<ExtraPageFrontmatter extends Record<any, any> = Record<string, unknown>> = {
|
|
45
45
|
/**
|
|
46
46
|
* Identifier of the page
|
|
47
47
|
*
|
|
@@ -85,14 +85,14 @@ declare type PageBase<ExtraPageFrontmatter extends Record<any, any> = Record<str
|
|
|
85
85
|
/**
|
|
86
86
|
* Vuepress page data
|
|
87
87
|
*/
|
|
88
|
-
|
|
88
|
+
type PageData<ExtraPageData extends Record<any, any> = Record<never, never>, ExtraPageFrontmatter extends Record<any, any> = Record<string, unknown>> = PageBase<ExtraPageFrontmatter> & ExtraPageData;
|
|
89
89
|
/**
|
|
90
90
|
* Vuepress page frontmatter
|
|
91
91
|
*
|
|
92
92
|
* Notice that frontmatter is parsed from yaml or other languages,
|
|
93
93
|
* so we cannot guarantee the type safety
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
type PageFrontmatter<T extends Record<any, any> = Record<string, unknown>> = Partial<T> & {
|
|
96
96
|
date?: string | Date;
|
|
97
97
|
description?: string;
|
|
98
98
|
head?: HeadConfig[];
|
|
@@ -106,7 +106,7 @@ declare type PageFrontmatter<T extends Record<any, any> = Record<string, unknown
|
|
|
106
106
|
/**
|
|
107
107
|
* Vuepress page header
|
|
108
108
|
*/
|
|
109
|
-
|
|
109
|
+
type PageHeader = MarkdownItHeader;
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* Vuepress site data
|
|
@@ -184,7 +184,7 @@ interface SiteLocaleData {
|
|
|
184
184
|
/**
|
|
185
185
|
* Site locale config
|
|
186
186
|
*/
|
|
187
|
-
|
|
187
|
+
type SiteLocaleConfig = LocaleConfig<SiteLocaleData>;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
190
|
* Context for SSR
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/shared",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.54",
|
|
4
4
|
"description": "Utils that shared between VuePress node and client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@mdit-vue/types": "^0.11.0",
|
|
33
|
-
"@vue/shared": "^3.2.
|
|
33
|
+
"@vue/shared": "^3.2.45"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|