@vuepress/theme-default 2.0.0-beta.37 → 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/client/composables/useSidebarItems.js +1 -1
- package/lib/node/defaultTheme.d.ts +3 -3
- package/lib/node/defaultTheme.js +92 -51
- package/lib/node/utils/assignDefaultLocaleOptions.d.ts +1 -1
- package/lib/node/utils/assignDefaultLocaleOptions.js +1 -1
- package/lib/node/utils/index.d.ts +0 -4
- package/lib/node/utils/index.js +0 -4
- package/lib/node/utils/resolveContainerPluginOptions.d.ts +2 -20
- package/lib/node/utils/resolveContainerPluginOptions.js +2 -57
- package/package.json +31 -25
- package/templates/{index.build.html → build.html} +0 -0
- package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.js +0 -18
- package/lib/node/utils/resolveExternalLinkIconPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveExternalLinkIconPluginOptions.js +0 -21
- package/lib/node/utils/resolveGitPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveGitPluginOptions.js +0 -22
- package/lib/node/utils/resolveMediumZoomPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveMediumZoomPluginOptions.js +0 -18
|
@@ -30,7 +30,7 @@ export const setupSidebarItems = () => {
|
|
|
30
30
|
*/
|
|
31
31
|
export const resolveSidebarItems = (frontmatter, themeLocale) => {
|
|
32
32
|
var _a, _b, _c, _d;
|
|
33
|
-
// get sidebar config from frontmatter >
|
|
33
|
+
// get sidebar config from frontmatter > theme data
|
|
34
34
|
const sidebarConfig = (_b = (_a = frontmatter.sidebar) !== null && _a !== void 0 ? _a : themeLocale.sidebar) !== null && _b !== void 0 ? _b : 'auto';
|
|
35
35
|
const sidebarDepth = (_d = (_c = frontmatter.sidebarDepth) !== null && _c !== void 0 ? _c : themeLocale.sidebarDepth) !== null && _d !== void 0 ? _d : 2;
|
|
36
36
|
// resolve sidebar items according to the config
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Theme
|
|
1
|
+
import type { Theme } from '@vuepress/core';
|
|
2
2
|
import type { DefaultThemeLocaleOptions, DefaultThemePluginsOptions } from '../shared';
|
|
3
|
-
export interface DefaultThemeOptions extends
|
|
3
|
+
export interface DefaultThemeOptions extends DefaultThemeLocaleOptions {
|
|
4
4
|
/**
|
|
5
5
|
* To avoid confusion with the root `plugins` option,
|
|
6
6
|
* we use `themePlugins`
|
|
7
7
|
*/
|
|
8
8
|
themePlugins?: DefaultThemePluginsOptions;
|
|
9
9
|
}
|
|
10
|
-
export declare const defaultTheme: Theme
|
|
10
|
+
export declare const defaultTheme: ({ themePlugins, ...localeOptions }?: DefaultThemeOptions) => Theme;
|
package/lib/node/defaultTheme.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultTheme = void 0;
|
|
4
|
+
const plugin_active_header_links_1 = require("@vuepress/plugin-active-header-links");
|
|
5
|
+
const plugin_back_to_top_1 = require("@vuepress/plugin-back-to-top");
|
|
6
|
+
const plugin_container_1 = require("@vuepress/plugin-container");
|
|
7
|
+
const plugin_external_link_icon_1 = require("@vuepress/plugin-external-link-icon");
|
|
8
|
+
const plugin_git_1 = require("@vuepress/plugin-git");
|
|
9
|
+
const plugin_medium_zoom_1 = require("@vuepress/plugin-medium-zoom");
|
|
10
|
+
const plugin_nprogress_1 = require("@vuepress/plugin-nprogress");
|
|
11
|
+
const plugin_palette_1 = require("@vuepress/plugin-palette");
|
|
12
|
+
const plugin_prismjs_1 = require("@vuepress/plugin-prismjs");
|
|
13
|
+
const plugin_theme_data_1 = require("@vuepress/plugin-theme-data");
|
|
4
14
|
const utils_1 = require("@vuepress/utils");
|
|
5
15
|
const utils_2 = require("./utils");
|
|
6
|
-
const defaultTheme = ({ themePlugins = {}, ...localeOptions }
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9
|
-
app.options.bundlerConfig.viteOptions = require('vite').mergeConfig(app.options.bundlerConfig.viteOptions, {
|
|
10
|
-
css: {
|
|
11
|
-
preprocessorOptions: {
|
|
12
|
-
scss: { charset: false },
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
}
|
|
16
|
+
const defaultTheme = ({ themePlugins = {}, ...localeOptions } = {}) => {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17
18
|
(0, utils_2.assignDefaultLocaleOptions)(localeOptions);
|
|
18
19
|
return {
|
|
19
20
|
name: '@vuepress/theme-default',
|
|
20
21
|
layouts: utils_1.path.resolve(__dirname, '../client/layouts'),
|
|
21
|
-
templateBuild: utils_1.path.resolve(__dirname, '../../templates/
|
|
22
|
+
templateBuild: utils_1.path.resolve(__dirname, '../../templates/build.html'),
|
|
22
23
|
// use alias to make all components replaceable
|
|
23
24
|
alias: Object.fromEntries(utils_1.fs
|
|
24
25
|
.readdirSync(utils_1.path.resolve(__dirname, '../client/components'))
|
|
@@ -36,45 +37,85 @@ const defaultTheme = ({ themePlugins = {}, ...localeOptions }, app) => {
|
|
|
36
37
|
page.routeMeta.title = page.title;
|
|
37
38
|
},
|
|
38
39
|
plugins: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(0,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(0, utils_2.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
40
|
+
// @vuepress/plugin-active-header-link
|
|
41
|
+
themePlugins.activeHeaderLinks !== false
|
|
42
|
+
? (0, plugin_active_header_links_1.activeHeaderLinksPlugin)({
|
|
43
|
+
headerLinkSelector: 'a.sidebar-item',
|
|
44
|
+
headerAnchorSelector: '.header-anchor',
|
|
45
|
+
// should greater than page transition duration
|
|
46
|
+
delay: 300,
|
|
47
|
+
})
|
|
48
|
+
: [],
|
|
49
|
+
// @vuepress/plugin-back-to-top
|
|
50
|
+
themePlugins.backToTop !== false ? (0, plugin_back_to_top_1.backToTopPlugin)() : [],
|
|
51
|
+
// @vuepress/plugin-container
|
|
52
|
+
((_a = themePlugins.container) === null || _a === void 0 ? void 0 : _a.tip) !== false
|
|
53
|
+
? (0, plugin_container_1.containerPlugin)((0, utils_2.resolveContainerPluginOptions)(localeOptions, 'tip'))
|
|
54
|
+
: [],
|
|
55
|
+
((_b = themePlugins.container) === null || _b === void 0 ? void 0 : _b.warning) !== false
|
|
56
|
+
? (0, plugin_container_1.containerPlugin)((0, utils_2.resolveContainerPluginOptions)(localeOptions, 'warning'))
|
|
57
|
+
: [],
|
|
58
|
+
((_c = themePlugins.container) === null || _c === void 0 ? void 0 : _c.danger) !== false
|
|
59
|
+
? (0, plugin_container_1.containerPlugin)((0, utils_2.resolveContainerPluginOptions)(localeOptions, 'danger'))
|
|
60
|
+
: [],
|
|
61
|
+
((_d = themePlugins.container) === null || _d === void 0 ? void 0 : _d.details) !== false
|
|
62
|
+
? (0, plugin_container_1.containerPlugin)({
|
|
63
|
+
type: 'details',
|
|
64
|
+
before: (info) => `<details class="custom-container details">${info ? `<summary>${info}</summary>` : ''}\n`,
|
|
65
|
+
after: () => '</details>\n',
|
|
66
|
+
})
|
|
67
|
+
: [],
|
|
68
|
+
((_e = themePlugins.container) === null || _e === void 0 ? void 0 : _e.codeGroup) !== false
|
|
69
|
+
? (0, plugin_container_1.containerPlugin)({
|
|
70
|
+
type: 'code-group',
|
|
71
|
+
before: () => `<CodeGroup>\n`,
|
|
72
|
+
after: () => '</CodeGroup>\n',
|
|
73
|
+
})
|
|
74
|
+
: [],
|
|
75
|
+
((_f = themePlugins.container) === null || _f === void 0 ? void 0 : _f.codeGroupItem) !== false
|
|
76
|
+
? (0, plugin_container_1.containerPlugin)({
|
|
77
|
+
type: 'code-group-item',
|
|
78
|
+
before: (info) => `<CodeGroupItem title="${info}">\n`,
|
|
79
|
+
after: () => '</CodeGroupItem>\n',
|
|
80
|
+
})
|
|
81
|
+
: [],
|
|
82
|
+
// @vuepress/plugin-external-link-icon
|
|
83
|
+
themePlugins.externalLinkIcon !== false
|
|
84
|
+
? (0, plugin_external_link_icon_1.externalLinkIconPlugin)({
|
|
85
|
+
locales: Object.entries(localeOptions.locales || {}).reduce((result, [key, value]) => {
|
|
86
|
+
var _a;
|
|
87
|
+
result[key] = {
|
|
88
|
+
openInNewWindow: (_a = value.openInNewWindow) !== null && _a !== void 0 ? _a : localeOptions.openInNewWindow,
|
|
89
|
+
};
|
|
90
|
+
return result;
|
|
91
|
+
}, {}),
|
|
92
|
+
})
|
|
93
|
+
: [],
|
|
94
|
+
// @vuepress/plugin-git
|
|
95
|
+
themePlugins.git !== false
|
|
96
|
+
? (0, plugin_git_1.gitPlugin)({
|
|
97
|
+
createdTime: false,
|
|
98
|
+
updatedTime: localeOptions.lastUpdated !== false,
|
|
99
|
+
contributors: localeOptions.contributors !== false,
|
|
100
|
+
})
|
|
101
|
+
: [],
|
|
102
|
+
// @vuepress/plugin-medium-zoom
|
|
103
|
+
themePlugins.mediumZoom !== false
|
|
104
|
+
? (0, plugin_medium_zoom_1.mediumZoomPlugin)({
|
|
105
|
+
selector: '.theme-default-content > img, .theme-default-content :not(a) > img',
|
|
106
|
+
zoomOptions: {},
|
|
107
|
+
// should greater than page transition duration
|
|
108
|
+
delay: 300,
|
|
109
|
+
})
|
|
110
|
+
: [],
|
|
111
|
+
// @vuepress/plugin-nprogress
|
|
112
|
+
themePlugins.nprogress !== false ? (0, plugin_nprogress_1.nprogressPlugin)() : [],
|
|
113
|
+
// @vuepress/plugin-palette
|
|
114
|
+
(0, plugin_palette_1.palettePlugin)({ preset: 'sass' }),
|
|
115
|
+
// @vuepress/plugin-prismjs
|
|
116
|
+
themePlugins.prismjs !== false ? (0, plugin_prismjs_1.prismjsPlugin)() : [],
|
|
117
|
+
// @vuepress/plugin-theme-data
|
|
118
|
+
(0, plugin_theme_data_1.themeDataPlugin)({ themeData: localeOptions }),
|
|
78
119
|
],
|
|
79
120
|
};
|
|
80
121
|
};
|
|
@@ -2,6 +2,6 @@ import type { DefaultThemeLocaleData, DefaultThemeLocaleOptions } from '../../sh
|
|
|
2
2
|
export declare const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions;
|
|
3
3
|
export declare const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData;
|
|
4
4
|
/**
|
|
5
|
-
* Assign default options
|
|
5
|
+
* Assign default options
|
|
6
6
|
*/
|
|
7
7
|
export declare const assignDefaultLocaleOptions: (localeOptions: DefaultThemeLocaleOptions) => void;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
export * from './assignDefaultLocaleOptions';
|
|
2
|
-
export * from './resolveActiveHeaderLinksPluginOptions';
|
|
3
2
|
export * from './resolveContainerPluginOptions';
|
|
4
|
-
export * from './resolveExternalLinkIconPluginOptions';
|
|
5
|
-
export * from './resolveGitPluginOptions';
|
|
6
|
-
export * from './resolveMediumZoomPluginOptions';
|
package/lib/node/utils/index.js
CHANGED
|
@@ -15,8 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./assignDefaultLocaleOptions"), exports);
|
|
18
|
-
__exportStar(require("./resolveActiveHeaderLinksPluginOptions"), exports);
|
|
19
18
|
__exportStar(require("./resolveContainerPluginOptions"), exports);
|
|
20
|
-
__exportStar(require("./resolveExternalLinkIconPluginOptions"), exports);
|
|
21
|
-
__exportStar(require("./resolveGitPluginOptions"), exports);
|
|
22
|
-
__exportStar(require("./resolveMediumZoomPluginOptions"), exports);
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
import type { ContainerPluginOptions } from '@vuepress/plugin-container';
|
|
2
|
-
import type { DefaultThemeData
|
|
2
|
+
import type { DefaultThemeData } from '../../shared';
|
|
3
3
|
/**
|
|
4
4
|
* Resolve options for @vuepress/plugin-container
|
|
5
5
|
*
|
|
6
6
|
* For custom containers default title
|
|
7
7
|
*/
|
|
8
|
-
export declare const resolveContainerPluginOptions: (
|
|
9
|
-
/**
|
|
10
|
-
* Resolve options for @vuepress/plugin-container
|
|
11
|
-
*
|
|
12
|
-
* For details container
|
|
13
|
-
*/
|
|
14
|
-
export declare const resolveContainerPluginOptionsForDetails: (themePlugins: DefaultThemePluginsOptions) => ContainerPluginOptions | boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Resolve options for @vuepress/plugin-container
|
|
17
|
-
*
|
|
18
|
-
* For code-group container
|
|
19
|
-
*/
|
|
20
|
-
export declare const resolveContainerPluginOptionsForCodeGroup: (themePlugins: DefaultThemePluginsOptions) => ContainerPluginOptions | boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Resolve options for @vuepress/plugin-container
|
|
23
|
-
*
|
|
24
|
-
* For code-group-item block
|
|
25
|
-
*/
|
|
26
|
-
export declare const resolveContainerPluginOptionsForCodeGroupItem: (themePlugins: DefaultThemePluginsOptions) => ContainerPluginOptions | boolean;
|
|
8
|
+
export declare const resolveContainerPluginOptions: (localeOptions: DefaultThemeData, type: 'tip' | 'warning' | 'danger') => ContainerPluginOptions;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolveContainerPluginOptions = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Resolve options for @vuepress/plugin-container
|
|
6
6
|
*
|
|
7
7
|
* For custom containers default title
|
|
8
8
|
*/
|
|
9
|
-
const resolveContainerPluginOptions = (
|
|
10
|
-
var _a;
|
|
11
|
-
if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a[type]) === false) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
9
|
+
const resolveContainerPluginOptions = (localeOptions, type) => {
|
|
14
10
|
const locales = Object.entries(localeOptions.locales || {}).reduce((result, [key, value]) => {
|
|
15
11
|
var _a;
|
|
16
12
|
result[key] = {
|
|
@@ -24,54 +20,3 @@ const resolveContainerPluginOptions = (themePlugins, localeOptions, type) => {
|
|
|
24
20
|
};
|
|
25
21
|
};
|
|
26
22
|
exports.resolveContainerPluginOptions = resolveContainerPluginOptions;
|
|
27
|
-
/**
|
|
28
|
-
* Resolve options for @vuepress/plugin-container
|
|
29
|
-
*
|
|
30
|
-
* For details container
|
|
31
|
-
*/
|
|
32
|
-
const resolveContainerPluginOptionsForDetails = (themePlugins) => {
|
|
33
|
-
var _a;
|
|
34
|
-
if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a.details) === false) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
type: 'details',
|
|
39
|
-
before: (info) => `<details class="custom-container details">${info ? `<summary>${info}</summary>` : ''}\n`,
|
|
40
|
-
after: () => '</details>\n',
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
exports.resolveContainerPluginOptionsForDetails = resolveContainerPluginOptionsForDetails;
|
|
44
|
-
/**
|
|
45
|
-
* Resolve options for @vuepress/plugin-container
|
|
46
|
-
*
|
|
47
|
-
* For code-group container
|
|
48
|
-
*/
|
|
49
|
-
const resolveContainerPluginOptionsForCodeGroup = (themePlugins) => {
|
|
50
|
-
var _a;
|
|
51
|
-
if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a.codeGroup) === false) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
type: 'code-group',
|
|
56
|
-
before: () => `<CodeGroup>\n`,
|
|
57
|
-
after: () => '</CodeGroup>\n',
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
exports.resolveContainerPluginOptionsForCodeGroup = resolveContainerPluginOptionsForCodeGroup;
|
|
61
|
-
/**
|
|
62
|
-
* Resolve options for @vuepress/plugin-container
|
|
63
|
-
*
|
|
64
|
-
* For code-group-item block
|
|
65
|
-
*/
|
|
66
|
-
const resolveContainerPluginOptionsForCodeGroupItem = (themePlugins) => {
|
|
67
|
-
var _a;
|
|
68
|
-
if (((_a = themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.container) === null || _a === void 0 ? void 0 : _a.codeGroupItem) === false) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
type: 'code-group-item',
|
|
73
|
-
before: (info) => `<CodeGroupItem title="${info}">\n`,
|
|
74
|
-
after: () => '</CodeGroupItem>\n',
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
exports.resolveContainerPluginOptionsForCodeGroupItem = resolveContainerPluginOptionsForCodeGroupItem;
|
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,41 +17,47 @@
|
|
|
17
17
|
"url": "git+https://github.com/vuepress/vuepress-next.git"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
|
-
"author": "
|
|
20
|
+
"author": "meteorlxy",
|
|
21
21
|
"main": "lib/node/index.js",
|
|
22
22
|
"types": "lib/node/index.d.ts",
|
|
23
23
|
"files": [
|
|
24
24
|
"lib",
|
|
25
25
|
"templates"
|
|
26
26
|
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "tsc -b tsconfig.build.json",
|
|
29
|
-
"clean": "rimraf lib *.tsbuildinfo",
|
|
30
|
-
"copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
|
|
31
|
-
},
|
|
32
27
|
"dependencies": {
|
|
33
|
-
"@vuepress/client": "2.0.0-beta.
|
|
34
|
-
"@vuepress/core": "2.0.0-beta.
|
|
35
|
-
"@vuepress/plugin-active-header-links": "2.0.0-beta.
|
|
36
|
-
"@vuepress/plugin-back-to-top": "2.0.0-beta.
|
|
37
|
-
"@vuepress/plugin-container": "2.0.0-beta.
|
|
38
|
-
"@vuepress/plugin-external-link-icon": "2.0.0-beta.
|
|
39
|
-
"@vuepress/plugin-git": "2.0.0-beta.
|
|
40
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-beta.
|
|
41
|
-
"@vuepress/plugin-nprogress": "2.0.0-beta.
|
|
42
|
-
"@vuepress/plugin-palette": "2.0.0-beta.
|
|
43
|
-
"@vuepress/plugin-prismjs": "2.0.0-beta.
|
|
44
|
-
"@vuepress/plugin-theme-data": "2.0.0-beta.
|
|
45
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
46
|
-
"@vuepress/utils": "2.0.0-beta.
|
|
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",
|
|
47
42
|
"@vueuse/core": "^8.2.1",
|
|
48
43
|
"sass": "^1.49.10",
|
|
49
|
-
"
|
|
50
|
-
"vue": "^3.2.31",
|
|
44
|
+
"vue": "^3.2.33",
|
|
51
45
|
"vue-router": "^4.0.14"
|
|
52
46
|
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"sass-loader": "^12.6.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"sass-loader": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
53
55
|
"publishConfig": {
|
|
54
56
|
"access": "public"
|
|
55
57
|
},
|
|
56
|
-
"
|
|
57
|
-
|
|
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
|
+
}
|
|
File without changes
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ActiveHeaderLinksPluginOptions } from '@vuepress/plugin-active-header-links';
|
|
2
|
-
import type { DefaultThemePluginsOptions } from '../../shared';
|
|
3
|
-
/**
|
|
4
|
-
* Resolve options for @vuepress/plugin-active-header-links
|
|
5
|
-
*/
|
|
6
|
-
export declare const resolveActiveHeaderLinksPluginOptions: (themePlugins: DefaultThemePluginsOptions) => ActiveHeaderLinksPluginOptions | boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveActiveHeaderLinksPluginOptions = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Resolve options for @vuepress/plugin-active-header-links
|
|
6
|
-
*/
|
|
7
|
-
const resolveActiveHeaderLinksPluginOptions = (themePlugins) => {
|
|
8
|
-
if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.activeHeaderLinks) === false) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
headerLinkSelector: 'a.sidebar-item',
|
|
13
|
-
headerAnchorSelector: '.header-anchor',
|
|
14
|
-
// should greater than page transition duration
|
|
15
|
-
delay: 300,
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
exports.resolveActiveHeaderLinksPluginOptions = resolveActiveHeaderLinksPluginOptions;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ExternalLinkIconPluginOptions } from '@vuepress/plugin-external-link-icon';
|
|
2
|
-
import type { DefaultThemeData, DefaultThemePluginsOptions } from '../../shared';
|
|
3
|
-
/**
|
|
4
|
-
* Resolve options for @vuepress/plugin-external-link-icon
|
|
5
|
-
*/
|
|
6
|
-
export declare const resolveExternalLinkIconPluginOptions: (themePlugins: DefaultThemePluginsOptions, localeOptions: DefaultThemeData) => ExternalLinkIconPluginOptions | boolean;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveExternalLinkIconPluginOptions = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Resolve options for @vuepress/plugin-external-link-icon
|
|
6
|
-
*/
|
|
7
|
-
const resolveExternalLinkIconPluginOptions = (themePlugins, localeOptions) => {
|
|
8
|
-
if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.externalLinkIcon) === false) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
locales: Object.entries(localeOptions.locales || {}).reduce((result, [key, value]) => {
|
|
13
|
-
var _a;
|
|
14
|
-
result[key] = {
|
|
15
|
-
openInNewWindow: (_a = value.openInNewWindow) !== null && _a !== void 0 ? _a : localeOptions.openInNewWindow,
|
|
16
|
-
};
|
|
17
|
-
return result;
|
|
18
|
-
}, {}),
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
exports.resolveExternalLinkIconPluginOptions = resolveExternalLinkIconPluginOptions;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { GitPluginOptions } from '@vuepress/plugin-git';
|
|
2
|
-
import type { DefaultThemeLocaleOptions, DefaultThemePluginsOptions } from '../../shared';
|
|
3
|
-
/**
|
|
4
|
-
* Resolve options for @vuepress/plugin-git
|
|
5
|
-
*/
|
|
6
|
-
export declare const resolveGitPluginOptions: (themePlugins: DefaultThemePluginsOptions, localeOptions: DefaultThemeLocaleOptions) => GitPluginOptions | boolean;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveGitPluginOptions = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Resolve options for @vuepress/plugin-git
|
|
6
|
-
*/
|
|
7
|
-
const resolveGitPluginOptions = (themePlugins, localeOptions) => {
|
|
8
|
-
if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.git) === false) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
const enableUpdatedTime = localeOptions.lastUpdated !== false;
|
|
12
|
-
const enableContributors = localeOptions.contributors !== false;
|
|
13
|
-
if (!enableUpdatedTime && !enableContributors) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
createdTime: false,
|
|
18
|
-
updatedTime: enableUpdatedTime,
|
|
19
|
-
contributors: enableContributors,
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveGitPluginOptions = resolveGitPluginOptions;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { MediumZoomPluginOptions } from '@vuepress/plugin-medium-zoom';
|
|
2
|
-
import type { DefaultThemePluginsOptions } from '../../shared';
|
|
3
|
-
/**
|
|
4
|
-
* Resolve options for @vuepress/plugin-medium-zoom
|
|
5
|
-
*/
|
|
6
|
-
export declare const resolveMediumZoomPluginOptions: (themePlugins: DefaultThemePluginsOptions) => MediumZoomPluginOptions | boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveMediumZoomPluginOptions = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Resolve options for @vuepress/plugin-medium-zoom
|
|
6
|
-
*/
|
|
7
|
-
const resolveMediumZoomPluginOptions = (themePlugins) => {
|
|
8
|
-
if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.mediumZoom) === false) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
selector: '.theme-default-content > img, .theme-default-content :not(a) > img',
|
|
13
|
-
zoomOptions: {},
|
|
14
|
-
// should greater than page transition duration
|
|
15
|
-
delay: 300,
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
exports.resolveMediumZoomPluginOptions = resolveMediumZoomPluginOptions;
|