@vuepress/theme-default 2.0.0-beta.4 → 2.0.0-beta.40
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/lib/{clientAppEnhance.d.ts → client/clientAppEnhance.d.ts} +0 -0
- package/lib/client/clientAppEnhance.js +34 -0
- package/lib/{clientAppSetup.d.ts → client/clientAppSetup.d.ts} +0 -0
- package/lib/client/clientAppSetup.js +6 -0
- package/lib/client/components/AutoLink.vue +113 -0
- package/lib/client/components/DropdownTransition.vue +21 -0
- package/lib/client/components/Home.vue +15 -0
- package/lib/client/components/HomeContent.vue +5 -0
- package/lib/client/components/HomeFeatures.vue +23 -0
- package/lib/client/components/HomeFooter.vue +17 -0
- package/lib/client/components/HomeHero.vue +97 -0
- package/lib/client/components/Navbar.vue +76 -0
- package/lib/client/components/NavbarBrand.vue +55 -0
- package/lib/client/components/NavbarDropdown.vue +126 -0
- package/lib/{components/NavbarLinks.vue → client/components/NavbarItems.vue} +27 -47
- package/lib/{components → client/components}/Page.vue +5 -15
- package/lib/{components → client/components}/PageMeta.vue +48 -59
- package/lib/{components → client/components}/PageNav.vue +43 -56
- package/lib/client/components/Sidebar.vue +13 -0
- package/lib/client/components/SidebarItem.vue +80 -0
- package/lib/client/components/SidebarItems.vue +54 -0
- package/lib/client/components/ToggleDarkModeButton.vue +57 -0
- package/lib/client/components/ToggleSidebarButton.vue +24 -0
- package/lib/client/components/global/Badge.vue +31 -0
- package/lib/client/components/global/CodeGroup.d.ts +5 -0
- package/lib/client/components/global/CodeGroup.js +107 -0
- package/lib/client/components/global/CodeGroupItem.vue +31 -0
- package/lib/{composables → client/composables}/index.d.ts +2 -0
- package/lib/{composables → client/composables}/index.js +2 -0
- package/lib/client/composables/useDarkMode.d.ts +12 -0
- package/lib/client/composables/useDarkMode.js +57 -0
- package/lib/{composables → client/composables}/useNavLink.d.ts +6 -1
- package/lib/{composables → client/composables}/useNavLink.js +0 -0
- package/lib/{composables → client/composables}/useResolveRouteWithRedirect.d.ts +1 -1
- package/lib/{composables → client/composables}/useResolveRouteWithRedirect.js +1 -1
- package/lib/client/composables/useScrollPromise.d.ts +6 -0
- package/lib/client/composables/useScrollPromise.js +14 -0
- package/lib/{composables → client/composables}/useSidebarItems.d.ts +12 -7
- package/lib/client/composables/useSidebarItems.js +120 -0
- package/lib/{composables → client/composables}/useThemeData.d.ts +2 -2
- package/lib/{composables → client/composables}/useThemeData.js +1 -1
- package/lib/client/index.d.ts +4 -0
- package/lib/client/index.js +2 -0
- package/lib/client/layouts/404.vue +25 -0
- package/lib/client/layouts/Layout.vue +128 -0
- package/lib/{shim.d.ts → client/shim.d.ts} +0 -0
- package/lib/{styles/_wrapper.scss → client/styles/_mixins.scss} +7 -2
- package/lib/client/styles/_variables.scss +11 -0
- package/lib/{styles → client/styles}/arrow.scss +4 -6
- package/lib/{styles → client/styles}/badge.scss +9 -11
- package/lib/{styles → client/styles}/code-group.scss +9 -2
- package/lib/{styles → client/styles}/code.scss +21 -33
- package/lib/client/styles/custom-container.scss +88 -0
- package/lib/{styles → client/styles}/home.scss +27 -24
- package/lib/{styles → client/styles}/index.scss +4 -4
- package/lib/{styles → client/styles}/layout.scss +52 -35
- package/lib/{styles/dropdown.scss → client/styles/navbar-dropdown.scss} +37 -47
- package/lib/client/styles/navbar.scss +177 -0
- package/lib/client/styles/normalize.scss +172 -0
- package/lib/{styles → client/styles}/page.scss +15 -8
- package/lib/client/styles/sidebar.scss +134 -0
- package/lib/{styles → client/styles}/toc.scss +0 -0
- package/lib/client/styles/transitions.scss +22 -0
- package/lib/client/styles/vars-dark.scss +46 -0
- package/lib/client/styles/vars.scss +133 -0
- package/lib/{utils → client/utils}/index.d.ts +1 -0
- package/lib/{utils → client/utils}/index.js +1 -0
- package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
- package/lib/client/utils/isActiveSidebarItem.js +20 -0
- package/lib/{utils → client/utils}/resolveEditLink.d.ts +1 -1
- package/lib/{utils → client/utils}/resolveEditLink.js +14 -8
- package/lib/client/utils/resolveRepoType.d.ts +2 -0
- package/lib/{utils → client/utils}/resolveRepoType.js +3 -1
- package/lib/node/defaultTheme.d.ts +10 -0
- package/lib/node/defaultTheme.js +122 -0
- package/lib/node/index.d.ts +5 -5
- package/lib/node/index.js +10 -6
- package/lib/node/utils/assignDefaultLocaleOptions.d.ts +7 -0
- package/lib/node/{assignDefaultLocaleOptions.js → utils/assignDefaultLocaleOptions.js} +11 -9
- package/lib/node/utils/index.d.ts +2 -0
- package/lib/node/utils/index.js +18 -0
- package/lib/node/utils/resolveContainerPluginOptions.d.ts +8 -0
- package/lib/node/utils/resolveContainerPluginOptions.js +22 -0
- package/lib/{types → shared}/index.d.ts +0 -0
- package/lib/{types → shared}/index.js +5 -1
- package/lib/{types → shared}/nav.d.ts +11 -12
- package/lib/{types → shared}/nav.js +0 -0
- package/lib/{types → shared}/options.d.ts +42 -10
- package/lib/{types → shared}/options.js +0 -0
- package/lib/{types → shared}/page.d.ts +13 -5
- package/lib/{types → shared}/page.js +0 -0
- package/package.json +38 -29
- package/templates/build.html +33 -0
- package/CHANGELOG.md +0 -353
- package/lib/clientAppEnhance.js +0 -23
- package/lib/clientAppSetup.js +0 -11
- package/lib/components/DropdownLink.vue +0 -141
- package/lib/components/DropdownTransition.vue +0 -34
- package/lib/components/Home.vue +0 -133
- package/lib/components/NavLink.vue +0 -105
- package/lib/components/Navbar.vue +0 -113
- package/lib/components/Sidebar.vue +0 -38
- package/lib/components/SidebarChild.d.ts +0 -6
- package/lib/components/SidebarChild.js +0 -83
- package/lib/components/ToggleSidebarButton.vue +0 -27
- package/lib/components/global/Badge.vue +0 -37
- package/lib/components/global/CodeGroup.vue +0 -85
- package/lib/components/global/CodeGroupItem.vue +0 -25
- package/lib/components/global/OutboundLink.vue +0 -30
- package/lib/composables/useSidebarItems.js +0 -108
- package/lib/index.d.ts +0 -6
- package/lib/index.js +0 -67
- package/lib/layouts/404.vue +0 -38
- package/lib/layouts/Layout.vue +0 -132
- package/lib/node/assignDefaultLocaleOptions.d.ts +0 -5
- package/lib/node/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
- package/lib/node/resolveActiveHeaderLinksPluginOptions.js +0 -16
- package/lib/node/resolveContainerPluginOptions.d.ts +0 -26
- package/lib/node/resolveContainerPluginOptions.js +0 -79
- package/lib/node/resolveGitPluginOptions.d.ts +0 -6
- package/lib/node/resolveGitPluginOptions.js +0 -22
- package/lib/node/resolveMediumZoomPluginOptions.d.ts +0 -6
- package/lib/node/resolveMediumZoomPluginOptions.js +0 -17
- package/lib/styles/_normalize.scss +0 -148
- package/lib/styles/_variables.scss +0 -34
- package/lib/styles/custom-container.scss +0 -78
- package/lib/styles/navbar.scss +0 -140
- package/lib/styles/plugins.scss +0 -18
- package/lib/styles/sidebar.scss +0 -147
- package/lib/styles/sr-only.scss +0 -12
- package/lib/styles/transitions.scss +0 -13
- package/lib/utils/resolveRepoType.d.ts +0 -2
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assignDefaultLocaleOptions = void 0;
|
|
4
|
-
|
|
3
|
+
exports.assignDefaultLocaleOptions = exports.DEFAULT_LOCALE_DATA = exports.DEFAULT_LOCALE_OPTIONS = void 0;
|
|
4
|
+
exports.DEFAULT_LOCALE_OPTIONS = {
|
|
5
5
|
// navbar
|
|
6
6
|
navbar: [],
|
|
7
7
|
logo: null,
|
|
8
|
+
darkMode: true,
|
|
8
9
|
repo: null,
|
|
9
10
|
selectLanguageText: 'Languages',
|
|
10
11
|
selectLanguageAriaLabel: 'Select language',
|
|
11
12
|
// sidebar
|
|
12
13
|
sidebar: 'auto',
|
|
14
|
+
sidebarDepth: 2,
|
|
13
15
|
// page meta
|
|
14
16
|
editLink: true,
|
|
15
17
|
editLinkText: 'Edit this page',
|
|
@@ -25,17 +27,17 @@ const defaultLocaleOptions = {
|
|
|
25
27
|
`Looks like we've got some broken links.`,
|
|
26
28
|
],
|
|
27
29
|
backToHome: 'Take me home',
|
|
28
|
-
//
|
|
30
|
+
// a11y
|
|
29
31
|
openInNewWindow: 'open in new window',
|
|
32
|
+
toggleDarkMode: 'toggle dark mode',
|
|
33
|
+
toggleSidebar: 'toggle sidebar',
|
|
30
34
|
};
|
|
31
|
-
|
|
35
|
+
exports.DEFAULT_LOCALE_DATA = {
|
|
32
36
|
// navbar
|
|
33
37
|
selectLanguageName: 'English',
|
|
34
|
-
// custom block
|
|
35
|
-
danger: 'WARNING',
|
|
36
38
|
};
|
|
37
39
|
/**
|
|
38
|
-
* Assign default options
|
|
40
|
+
* Assign default options
|
|
39
41
|
*/
|
|
40
42
|
const assignDefaultLocaleOptions = (localeOptions) => {
|
|
41
43
|
if (!localeOptions.locales) {
|
|
@@ -45,11 +47,11 @@ const assignDefaultLocaleOptions = (localeOptions) => {
|
|
|
45
47
|
localeOptions.locales['/'] = {};
|
|
46
48
|
}
|
|
47
49
|
Object.assign(localeOptions, {
|
|
48
|
-
...
|
|
50
|
+
...exports.DEFAULT_LOCALE_OPTIONS,
|
|
49
51
|
...localeOptions,
|
|
50
52
|
});
|
|
51
53
|
Object.assign(localeOptions.locales['/'], {
|
|
52
|
-
...
|
|
54
|
+
...exports.DEFAULT_LOCALE_DATA,
|
|
53
55
|
...localeOptions.locales['/'],
|
|
54
56
|
});
|
|
55
57
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./assignDefaultLocaleOptions"), exports);
|
|
18
|
+
__exportStar(require("./resolveContainerPluginOptions"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ContainerPluginOptions } from '@vuepress/plugin-container';
|
|
2
|
+
import type { DefaultThemeData } from '../../shared';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve options for @vuepress/plugin-container
|
|
5
|
+
*
|
|
6
|
+
* For custom containers default title
|
|
7
|
+
*/
|
|
8
|
+
export declare const resolveContainerPluginOptions: (localeOptions: DefaultThemeData, type: 'tip' | 'warning' | 'danger') => ContainerPluginOptions;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveContainerPluginOptions = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Resolve options for @vuepress/plugin-container
|
|
6
|
+
*
|
|
7
|
+
* For custom containers default title
|
|
8
|
+
*/
|
|
9
|
+
const resolveContainerPluginOptions = (localeOptions, type) => {
|
|
10
|
+
const locales = Object.entries(localeOptions.locales || {}).reduce((result, [key, value]) => {
|
|
11
|
+
var _a;
|
|
12
|
+
result[key] = {
|
|
13
|
+
defaultInfo: (_a = value === null || value === void 0 ? void 0 : value[type]) !== null && _a !== void 0 ? _a : localeOptions[type],
|
|
14
|
+
};
|
|
15
|
+
return result;
|
|
16
|
+
}, {});
|
|
17
|
+
return {
|
|
18
|
+
type,
|
|
19
|
+
locales,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
exports.resolveContainerPluginOptions = resolveContainerPluginOptions;
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -12,12 +12,13 @@ export interface NavGroup<T> extends NavItem {
|
|
|
12
12
|
children: T[];
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Props for `<
|
|
15
|
+
* Props for `<AutoLink>`
|
|
16
16
|
*/
|
|
17
17
|
export interface NavLink extends NavItem {
|
|
18
18
|
link: string;
|
|
19
19
|
rel?: string;
|
|
20
20
|
target?: string;
|
|
21
|
+
activeMatch?: string;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Navbar types
|
|
@@ -29,16 +30,14 @@ export declare type ResolvedNavbarItem = NavbarItem | NavGroup<ResolvedNavbarIte
|
|
|
29
30
|
/**
|
|
30
31
|
* Sidebar types
|
|
31
32
|
*/
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export declare type SidebarConfigArray = (SidebarGroup | SidebarItem | string)[];
|
|
33
|
+
export declare type SidebarItem = NavItem & Partial<NavLink>;
|
|
34
|
+
export declare type SidebarGroup = SidebarItem & NavGroup<SidebarItem | SidebarGroup | string>;
|
|
35
|
+
export declare type SidebarGroupCollapsible = SidebarGroup & {
|
|
36
|
+
collapsible?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare type SidebarConfigArray = (SidebarItem | SidebarGroupCollapsible | string)[];
|
|
39
39
|
export declare type SidebarConfigObject = Record<string, SidebarConfigArray>;
|
|
40
40
|
export declare type SidebarConfig = SidebarConfigArray | SidebarConfigObject;
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
41
|
+
export declare type ResolvedSidebarItem = SidebarItem & Partial<NavGroup<ResolvedSidebarItem>> & {
|
|
42
|
+
collapsible?: boolean;
|
|
43
|
+
};
|
|
File without changes
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import type { LocaleData, ThemeConfig } from '@vuepress/core';
|
|
2
1
|
import type { ThemeData } from '@vuepress/plugin-theme-data';
|
|
2
|
+
import type { LocaleData } from '@vuepress/shared';
|
|
3
3
|
import type { NavbarConfig, SidebarConfig } from './nav';
|
|
4
|
-
export interface DefaultThemeOptions extends ThemeConfig, DefaultThemeLocaleOptions {
|
|
5
|
-
/**
|
|
6
|
-
* To avoid confusion with the root `plugins` option,
|
|
7
|
-
* we use `themePlugins`
|
|
8
|
-
*/
|
|
9
|
-
themePlugins?: DefaultThemePluginsOptions;
|
|
10
|
-
}
|
|
11
4
|
export interface DefaultThemePluginsOptions {
|
|
12
5
|
/**
|
|
13
6
|
* Enable @vuepress/plugin-active-header-links or not
|
|
@@ -28,6 +21,10 @@ export interface DefaultThemePluginsOptions {
|
|
|
28
21
|
codeGroup?: boolean;
|
|
29
22
|
codeGroupItem?: boolean;
|
|
30
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Enable @vuepress/plugin-external-link-icon or not
|
|
26
|
+
*/
|
|
27
|
+
externalLinkIcon?: boolean;
|
|
31
28
|
/**
|
|
32
29
|
* Enable @vuepress/plugin-git or not
|
|
33
30
|
*/
|
|
@@ -66,6 +63,18 @@ export interface DefaultThemeLocaleData extends LocaleData {
|
|
|
66
63
|
* Logo to display in navbar
|
|
67
64
|
*/
|
|
68
65
|
logo?: null | string;
|
|
66
|
+
/**
|
|
67
|
+
* Navbar logo config for dark mode
|
|
68
|
+
*
|
|
69
|
+
* Logo to display in navbar in dark mode
|
|
70
|
+
*/
|
|
71
|
+
logoDark?: null | string;
|
|
72
|
+
/**
|
|
73
|
+
* Navbar dark mode button config
|
|
74
|
+
*
|
|
75
|
+
* Enable dark mode switching and display a button in navbar or not
|
|
76
|
+
*/
|
|
77
|
+
darkMode?: boolean;
|
|
69
78
|
/**
|
|
70
79
|
* Navbar repository config
|
|
71
80
|
*
|
|
@@ -104,6 +113,21 @@ export interface DefaultThemeLocaleData extends LocaleData {
|
|
|
104
113
|
* Set to `false` to disable sidebar in current locale
|
|
105
114
|
*/
|
|
106
115
|
sidebar?: 'auto' | false | SidebarConfig;
|
|
116
|
+
/**
|
|
117
|
+
* Sidebar depth
|
|
118
|
+
*
|
|
119
|
+
* - Set to `0` to disable all levels
|
|
120
|
+
* - Set to `1` to include `<h2>`
|
|
121
|
+
* - Set to `2` to include `<h2>` and `<h3>`
|
|
122
|
+
* - ...
|
|
123
|
+
*
|
|
124
|
+
* The max value depends on which headers you have extracted
|
|
125
|
+
* via `markdown.extractHeaders.level`.
|
|
126
|
+
*
|
|
127
|
+
* The default value of `markdown.extractHeaders.level` is `[2, 3]`,
|
|
128
|
+
* so the default max value of `sidebarDepth` is `2`
|
|
129
|
+
*/
|
|
130
|
+
sidebarDepth?: number;
|
|
107
131
|
/**
|
|
108
132
|
* Page meta - edit link config
|
|
109
133
|
*
|
|
@@ -135,7 +159,7 @@ export interface DefaultThemeLocaleData extends LocaleData {
|
|
|
135
159
|
/**
|
|
136
160
|
* Page meta - edit link config
|
|
137
161
|
*
|
|
138
|
-
* Set this config if the branch of your docs is not '
|
|
162
|
+
* Set this config if the branch of your docs is not 'main'
|
|
139
163
|
*/
|
|
140
164
|
docsBranch?: string;
|
|
141
165
|
/**
|
|
@@ -199,7 +223,15 @@ export interface DefaultThemeLocaleData extends LocaleData {
|
|
|
199
223
|
*/
|
|
200
224
|
backToHome?: string;
|
|
201
225
|
/**
|
|
202
|
-
*
|
|
226
|
+
* A11y text for external link icon
|
|
203
227
|
*/
|
|
204
228
|
openInNewWindow?: string;
|
|
229
|
+
/**
|
|
230
|
+
* A11y text for dark mode toggle button
|
|
231
|
+
*/
|
|
232
|
+
toggleDarkMode?: string;
|
|
233
|
+
/**
|
|
234
|
+
* A11y text for sidebar toggle button
|
|
235
|
+
*/
|
|
236
|
+
toggleSidebar?: string;
|
|
205
237
|
}
|
|
File without changes
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { GitPluginPageData } from '@vuepress/plugin-git';
|
|
2
2
|
import type { NavLink, SidebarConfig } from './nav';
|
|
3
3
|
export interface DefaultThemePageData extends GitPluginPageData {
|
|
4
|
-
filePathRelative: string;
|
|
4
|
+
filePathRelative: string | null;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface DefaultThemePageFrontmatter {
|
|
7
|
+
home?: boolean;
|
|
8
|
+
navbar?: boolean;
|
|
9
|
+
pageClass?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DefaultThemeHomePageFrontmatter extends DefaultThemePageFrontmatter {
|
|
7
12
|
home: true;
|
|
8
13
|
heroImage?: string;
|
|
14
|
+
heroImageDark?: string;
|
|
9
15
|
heroAlt?: string;
|
|
10
16
|
heroText?: string | null;
|
|
11
17
|
tagline?: string | null;
|
|
@@ -21,12 +27,14 @@ export interface DefaultThemeHomePageFrontmatter {
|
|
|
21
27
|
footer?: string;
|
|
22
28
|
footerHtml?: boolean;
|
|
23
29
|
}
|
|
24
|
-
export interface DefaultThemePageFrontmatter {
|
|
25
|
-
home?:
|
|
30
|
+
export interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter {
|
|
31
|
+
home?: false;
|
|
26
32
|
editLink?: boolean;
|
|
33
|
+
editLinkPattern?: string;
|
|
27
34
|
lastUpdated?: boolean;
|
|
28
35
|
contributors?: boolean;
|
|
36
|
+
sidebar?: 'auto' | false | SidebarConfig;
|
|
37
|
+
sidebarDepth?: number;
|
|
29
38
|
prev?: string | NavLink;
|
|
30
39
|
next?: string | NavLink;
|
|
31
|
-
sidebar?: 'auto' | false | SidebarConfig;
|
|
32
40
|
}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/theme-default",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.40",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -17,38 +17,47 @@
|
|
|
17
17
|
"url": "git+https://github.com/vuepress/vuepress-next.git"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
|
-
"author": "
|
|
21
|
-
"main": "lib/index.js",
|
|
22
|
-
"types": "lib/index.d.ts",
|
|
20
|
+
"author": "meteorlxy",
|
|
21
|
+
"main": "lib/node/index.js",
|
|
22
|
+
"types": "lib/node/index.d.ts",
|
|
23
23
|
"files": [
|
|
24
|
-
"lib"
|
|
24
|
+
"lib",
|
|
25
|
+
"templates"
|
|
25
26
|
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "tsc -b tsconfig.build.json",
|
|
28
|
-
"clean": "rimraf lib *.tsbuildinfo",
|
|
29
|
-
"copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
|
|
30
|
-
},
|
|
31
27
|
"dependencies": {
|
|
32
|
-
"@vuepress/client": "2.0.0-beta.
|
|
33
|
-
"@vuepress/core": "2.0.0-beta.
|
|
34
|
-
"@vuepress/plugin-active-header-links": "2.0.0-beta.
|
|
35
|
-
"@vuepress/plugin-back-to-top": "2.0.0-beta.
|
|
36
|
-
"@vuepress/plugin-container": "2.0.0-beta.
|
|
37
|
-
"@vuepress/plugin-
|
|
38
|
-
"@vuepress/plugin-
|
|
39
|
-
"@vuepress/plugin-
|
|
40
|
-
"@vuepress/plugin-
|
|
41
|
-
"@vuepress/plugin-
|
|
42
|
-
"@vuepress/plugin-
|
|
43
|
-
"@vuepress/
|
|
44
|
-
"@vuepress/
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"vue
|
|
28
|
+
"@vuepress/client": "2.0.0-beta.40",
|
|
29
|
+
"@vuepress/core": "2.0.0-beta.40",
|
|
30
|
+
"@vuepress/plugin-active-header-links": "2.0.0-beta.40",
|
|
31
|
+
"@vuepress/plugin-back-to-top": "2.0.0-beta.40",
|
|
32
|
+
"@vuepress/plugin-container": "2.0.0-beta.40",
|
|
33
|
+
"@vuepress/plugin-external-link-icon": "2.0.0-beta.40",
|
|
34
|
+
"@vuepress/plugin-git": "2.0.0-beta.40",
|
|
35
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-beta.40",
|
|
36
|
+
"@vuepress/plugin-nprogress": "2.0.0-beta.40",
|
|
37
|
+
"@vuepress/plugin-palette": "2.0.0-beta.40",
|
|
38
|
+
"@vuepress/plugin-prismjs": "2.0.0-beta.40",
|
|
39
|
+
"@vuepress/plugin-theme-data": "2.0.0-beta.40",
|
|
40
|
+
"@vuepress/shared": "2.0.0-beta.40",
|
|
41
|
+
"@vuepress/utils": "2.0.0-beta.40",
|
|
42
|
+
"@vueuse/core": "^8.2.1",
|
|
43
|
+
"sass": "^1.49.10",
|
|
44
|
+
"vue": "^3.2.33",
|
|
45
|
+
"vue-router": "^4.0.14"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"sass-loader": "^12.6.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"sass-loader": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
49
54
|
},
|
|
50
55
|
"publishConfig": {
|
|
51
56
|
"access": "public"
|
|
52
57
|
},
|
|
53
|
-
"
|
|
54
|
-
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsc -b tsconfig.build.json",
|
|
60
|
+
"clean": "rimraf lib *.tsbuildinfo",
|
|
61
|
+
"copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="{{ lang }}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<meta name="generator" content="VuePress {{ version }}">
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--c-bg: #fff;
|
|
10
|
+
}
|
|
11
|
+
html.dark {
|
|
12
|
+
--c-bg: #22272e;
|
|
13
|
+
}
|
|
14
|
+
html, body {
|
|
15
|
+
background-color: var(--c-bg);
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
<script>
|
|
19
|
+
const userMode = localStorage.getItem('vuepress-color-scheme');
|
|
20
|
+
const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
21
|
+
if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
|
|
22
|
+
document.documentElement.classList.toggle('dark', true);
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
<!--vuepress-ssr-head-->
|
|
26
|
+
<!--vuepress-ssr-resources-->
|
|
27
|
+
<!--vuepress-ssr-styles-->
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div id="app"><!--vuepress-ssr-app--></div>
|
|
31
|
+
<!--vuepress-ssr-scripts-->
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|