@vuepress/theme-default 2.0.0-rc.123 → 2.0.0-rc.125
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 → dist}/client/components/VPHomeHero.vue +7 -14
- package/{lib → dist}/client/components/VPNavbar.vue +8 -11
- package/{lib → dist}/client/components/VPNavbarBrand.vue +4 -5
- package/dist/client/composables/index.d.ts +12 -0
- package/dist/client/composables/index.js +1 -0
- package/dist/client/composables/useDarkMode.d.ts +2 -0
- package/dist/client/composables/useDarkMode.js +2 -0
- package/dist/client/composables/useDarkMode.js.map +1 -0
- package/dist/client/composables/useData.d.ts +2 -0
- package/dist/client/composables/useData.js +2 -0
- package/dist/client/composables/useData.js.map +1 -0
- package/dist/client/composables/useEditLink.d.ts +2 -0
- package/dist/client/composables/useEditLink.js +2 -0
- package/dist/client/composables/useEditLink.js.map +1 -0
- package/dist/client/composables/useHeaders.d.ts +18 -0
- package/dist/client/composables/useHeaders.js +2 -0
- package/dist/client/composables/useHeaders.js.map +1 -0
- package/dist/client/composables/useNavbarConfig.d.ts +2 -0
- package/dist/client/composables/useNavbarConfig.js +2 -0
- package/dist/client/composables/useNavbarConfig.js.map +1 -0
- package/dist/client/composables/useNavbarRepo.d.ts +2 -0
- package/dist/client/composables/useNavbarRepo.js +2 -0
- package/dist/client/composables/useNavbarRepo.js.map +1 -0
- package/dist/client/composables/useNavbarSelectLanguage.d.ts +2 -0
- package/dist/client/composables/useNavbarSelectLanguage.js +2 -0
- package/dist/client/composables/useNavbarSelectLanguage.js.map +1 -0
- package/dist/client/composables/useNavigate.d.ts +2 -0
- package/dist/client/composables/useNavigate.js +2 -0
- package/dist/client/composables/useNavigate.js.map +1 -0
- package/dist/client/composables/useRelatedLinks.d.ts +2 -0
- package/dist/client/composables/useRelatedLinks.js +2 -0
- package/dist/client/composables/useRelatedLinks.js.map +1 -0
- package/dist/client/composables/useScrollPromise.d.ts +2 -0
- package/dist/client/composables/useScrollPromise.js +2 -0
- package/dist/client/composables/useScrollPromise.js.map +1 -0
- package/dist/client/composables/useSidebarItems.d.ts +2 -0
- package/dist/client/composables/useSidebarItems.js +2 -0
- package/dist/client/composables/useSidebarItems.js.map +1 -0
- package/dist/client/composables/useUpdateDeviceStatus.d.ts +2 -0
- package/dist/client/composables/useUpdateDeviceStatus.js +2 -0
- package/dist/client/composables/useUpdateDeviceStatus.js.map +1 -0
- package/dist/client/config.d.ts +6 -0
- package/dist/client/config.js +2 -0
- package/dist/client/config.js.map +1 -0
- package/dist/client/index.d.ts +21 -0
- package/dist/client/index.js +1 -0
- package/{lib → dist}/client/layouts/Layout.vue +2 -5
- package/{lib → dist}/client/layouts/NotFound.vue +1 -2
- package/{lib → dist}/client/styles/arrow.scss +1 -2
- package/{lib → dist}/client/styles/vars.scss +1 -2
- package/dist/client/utils/index.d.ts +6 -0
- package/dist/client/utils/index.js +1 -0
- package/dist/client/utils/isActiveSidebarItem.d.ts +2 -0
- package/dist/client/utils/isActiveSidebarItem.js +2 -0
- package/dist/client/utils/isActiveSidebarItem.js.map +1 -0
- package/dist/client/utils/resolveAutoLink.d.ts +2 -0
- package/dist/client/utils/resolveAutoLink.js +2 -0
- package/dist/client/utils/resolveAutoLink.js.map +1 -0
- package/dist/client/utils/resolveEditLink.d.ts +2 -0
- package/dist/client/utils/resolveEditLink.js +2 -0
- package/dist/client/utils/resolveEditLink.js.map +1 -0
- package/dist/client/utils/resolvePrefix.d.ts +2 -0
- package/dist/client/utils/resolvePrefix.js +2 -0
- package/dist/client/utils/resolvePrefix.js.map +1 -0
- package/dist/client/utils/resolveRepoType.d.ts +2 -0
- package/dist/client/utils/resolveRepoType.js +2 -0
- package/dist/client/utils/resolveRepoType.js.map +1 -0
- package/dist/isActiveSidebarItem-aythFTeC.d.ts +8 -0
- package/dist/nav-DikslSJ_.d.ts +36 -0
- package/dist/node/index.d.ts +108 -0
- package/dist/node/index.js +2 -0
- package/dist/node/index.js.map +1 -0
- package/dist/page-FWcDnzJp.d.ts +292 -0
- package/{lib/client/utils/resolveAutoLink.d.ts → dist/resolveAutoLink-BR2Z05MD.d.ts} +7 -2
- package/dist/resolveEditLink-DazcWeGf.d.ts +20 -0
- package/dist/resolvePrefix-BN9K9RA5.d.ts +5 -0
- package/dist/resolveRepoType-Wcj35_rs.d.ts +6 -0
- package/dist/sidebar-CF1YPYLN.d.ts +53 -0
- package/dist/typings-NbQSzbOn.d.ts +19 -0
- package/dist/useDarkMode-DLor2cV7.d.ts +19 -0
- package/dist/useData-JDen_Bxm.d.ts +13 -0
- package/dist/useEditLink-DPCTvXmM.d.ts +8 -0
- package/dist/useNavbarConfig-C19TGFg7.d.ts +8 -0
- package/dist/useNavbarRepo-DxhSIAFq.d.ts +13 -0
- package/dist/useNavbarSelectLanguage-4GkrPvc2.d.ts +13 -0
- package/dist/useNavigate-lH4xyHOV.d.ts +5 -0
- package/dist/useRelatedLinks-ChTW2RRU.d.ts +12 -0
- package/dist/useScrollPromise-BAl732Uv.d.ts +10 -0
- package/dist/useSidebarItems-CdpB96Ta.d.ts +80 -0
- package/dist/useUpdateDeviceStatus-SBnOZx8J.d.ts +14 -0
- package/package.json +39 -30
- package/lib/client/components/global/index.d.ts +0 -2
- package/lib/client/components/global/index.js +0 -2
- package/lib/client/composables/index.d.ts +0 -11
- package/lib/client/composables/index.js +0 -11
- package/lib/client/composables/useDarkMode.d.ts +0 -14
- package/lib/client/composables/useDarkMode.js +0 -64
- package/lib/client/composables/useData.d.ts +0 -8
- package/lib/client/composables/useData.js +0 -7
- package/lib/client/composables/useEditLink.d.ts +0 -3
- package/lib/client/composables/useEditLink.js +0 -28
- package/lib/client/composables/useHeaders.d.ts +0 -13
- package/lib/client/composables/useHeaders.js +0 -42
- package/lib/client/composables/useNavbarConfig.d.ts +0 -3
- package/lib/client/composables/useNavbarConfig.js +0 -27
- package/lib/client/composables/useNavbarRepo.d.ts +0 -8
- package/lib/client/composables/useNavbarRepo.js +0 -40
- package/lib/client/composables/useNavbarSelectLanguage.d.ts +0 -8
- package/lib/client/composables/useNavbarSelectLanguage.js +0 -60
- package/lib/client/composables/useNavigate.d.ts +0 -1
- package/lib/client/composables/useNavigate.js +0 -22
- package/lib/client/composables/useRelatedLinks.d.ts +0 -8
- package/lib/client/composables/useRelatedLinks.js +0 -95
- package/lib/client/composables/useScrollPromise.d.ts +0 -6
- package/lib/client/composables/useScrollPromise.js +0 -16
- package/lib/client/composables/useSidebarItems.d.ts +0 -75
- package/lib/client/composables/useSidebarItems.js +0 -164
- package/lib/client/composables/useUpdateDeviceStatus.d.ts +0 -10
- package/lib/client/composables/useUpdateDeviceStatus.js +0 -34
- package/lib/client/config.d.ts +0 -5
- package/lib/client/config.js +0 -35
- package/lib/client/index.d.ts +0 -4
- package/lib/client/index.js +0 -2
- package/lib/client/typings.d.ts +0 -13
- package/lib/client/typings.js +0 -1
- package/lib/client/utils/index.d.ts +0 -5
- package/lib/client/utils/index.js +0 -5
- package/lib/client/utils/isActiveSidebarItem.d.ts +0 -3
- package/lib/client/utils/isActiveSidebarItem.js +0 -20
- package/lib/client/utils/resolveAutoLink.js +0 -23
- package/lib/client/utils/resolveEditLink.d.ts +0 -9
- package/lib/client/utils/resolveEditLink.js +0 -29
- package/lib/client/utils/resolvePrefix.d.ts +0 -1
- package/lib/client/utils/resolvePrefix.js +0 -4
- package/lib/client/utils/resolveRepoType.d.ts +0 -2
- package/lib/client/utils/resolveRepoType.js +0 -12
- package/lib/node/defaultTheme.d.ts +0 -15
- package/lib/node/defaultTheme.js +0 -140
- package/lib/node/index.d.ts +0 -4
- package/lib/node/index.js +0 -2
- package/lib/node/typings.d.ts +0 -59
- package/lib/node/typings.js +0 -1
- package/lib/node/utils/assignDefaultLocaleOptions.d.ts +0 -7
- package/lib/node/utils/assignDefaultLocaleOptions.js +0 -51
- package/lib/node/utils/index.d.ts +0 -2
- package/lib/node/utils/index.js +0 -2
- package/lib/node/utils/resolveMarkdownHintLocales.d.ts +0 -12
- package/lib/node/utils/resolveMarkdownHintLocales.js +0 -22
- package/lib/shared/index.d.ts +0 -5
- package/lib/shared/index.js +0 -1
- package/lib/shared/nav.d.ts +0 -32
- package/lib/shared/nav.js +0 -1
- package/lib/shared/navbar.d.ts +0 -21
- package/lib/shared/navbar.js +0 -1
- package/lib/shared/options.d.ts +0 -244
- package/lib/shared/options.js +0 -1
- package/lib/shared/page.d.ts +0 -44
- package/lib/shared/page.js +0 -1
- package/lib/shared/sidebar.d.ts +0 -26
- package/lib/shared/sidebar.js +0 -1
- /package/{lib → dist}/client/components/VPAutoLink.vue +0 -0
- /package/{lib → dist}/client/components/VPDarkIcon.vue +0 -0
- /package/{lib → dist}/client/components/VPDropdownTransition.vue +0 -0
- /package/{lib → dist}/client/components/VPEditIcon.vue +0 -0
- /package/{lib → dist}/client/components/VPFadeSlideYTransition.vue +0 -0
- /package/{lib → dist}/client/components/VPHome.vue +0 -0
- /package/{lib → dist}/client/components/VPHomeFeatures.vue +0 -0
- /package/{lib → dist}/client/components/VPHomeFooter.vue +0 -0
- /package/{lib → dist}/client/components/VPLightIcon.vue +0 -0
- /package/{lib → dist}/client/components/VPNavbarDropdown.vue +0 -0
- /package/{lib → dist}/client/components/VPNavbarItems.vue +0 -0
- /package/{lib → dist}/client/components/VPPage.vue +0 -0
- /package/{lib → dist}/client/components/VPPageMeta.vue +0 -0
- /package/{lib → dist}/client/components/VPPageNav.vue +0 -0
- /package/{lib → dist}/client/components/VPSidebar.vue +0 -0
- /package/{lib → dist}/client/components/VPSidebarItem.vue +0 -0
- /package/{lib → dist}/client/components/VPSidebarItems.vue +0 -0
- /package/{lib → dist}/client/components/VPToggleColorModeButton.vue +0 -0
- /package/{lib → dist}/client/components/VPToggleSidebarButton.vue +0 -0
- /package/{lib → dist}/client/components/global/Badge.vue +0 -0
- /package/{lib → dist}/client/shim.d.ts +0 -0
- /package/{lib → dist}/client/styles/_mixins.scss +0 -0
- /package/{lib → dist}/client/styles/_variables.module.scss +0 -0
- /package/{lib → dist}/client/styles/_variables.scss +0 -0
- /package/{lib → dist}/client/styles/code-group.scss +0 -0
- /package/{lib → dist}/client/styles/content/code.scss +0 -0
- /package/{lib → dist}/client/styles/content/index.scss +0 -0
- /package/{lib → dist}/client/styles/content/normalize.scss +0 -0
- /package/{lib → dist}/client/styles/content/toc.scss +0 -0
- /package/{lib → dist}/client/styles/external-link-icon.scss +0 -0
- /package/{lib → dist}/client/styles/index.scss +0 -0
- /package/{lib → dist}/client/styles/layout.scss +0 -0
- /package/{lib → dist}/client/styles/normalize.scss +0 -0
- /package/{lib → dist}/client/styles/plugins.scss +0 -0
- /package/{lib → dist}/client/styles/vars-dark.scss +0 -0
package/lib/node/defaultTheme.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { addViteOptimizeDepsExclude } from '@vuepress/helper';
|
|
2
|
-
import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links';
|
|
3
|
-
import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
|
|
4
|
-
import { copyCodePlugin } from '@vuepress/plugin-copy-code';
|
|
5
|
-
import { gitPlugin } from '@vuepress/plugin-git';
|
|
6
|
-
import { linksCheckPlugin } from '@vuepress/plugin-links-check';
|
|
7
|
-
import { markdownHintPlugin } from '@vuepress/plugin-markdown-hint';
|
|
8
|
-
import { markdownTabPlugin } from '@vuepress/plugin-markdown-tab';
|
|
9
|
-
import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom';
|
|
10
|
-
import { nprogressPlugin } from '@vuepress/plugin-nprogress';
|
|
11
|
-
import { palettePlugin } from '@vuepress/plugin-palette';
|
|
12
|
-
import { prismjsPlugin } from '@vuepress/plugin-prismjs';
|
|
13
|
-
import { seoPlugin } from '@vuepress/plugin-seo';
|
|
14
|
-
import { sitemapPlugin } from '@vuepress/plugin-sitemap';
|
|
15
|
-
import { themeDataPlugin } from '@vuepress/plugin-theme-data';
|
|
16
|
-
import { isPlainObject } from 'vuepress/shared';
|
|
17
|
-
import { fs, getDirname, path } from 'vuepress/utils';
|
|
18
|
-
import { assignDefaultLocaleOptions, resolveMarkdownHintLocales, } from './utils/index.js';
|
|
19
|
-
const __dirname = import.meta.dirname || getDirname(import.meta.url);
|
|
20
|
-
export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } = {}) => {
|
|
21
|
-
assignDefaultLocaleOptions(localeOptions);
|
|
22
|
-
return {
|
|
23
|
-
name: '@vuepress/theme-default',
|
|
24
|
-
templateBuild: path.resolve(__dirname, '../../templates/build.html'),
|
|
25
|
-
alias: {
|
|
26
|
-
// use alias to make all components replaceable
|
|
27
|
-
...Object.fromEntries(fs
|
|
28
|
-
.readdirSync(path.resolve(__dirname, '../client/components'))
|
|
29
|
-
.filter((file) => file.endsWith('.vue'))
|
|
30
|
-
.map((file) => [
|
|
31
|
-
`@theme/${file}`,
|
|
32
|
-
path.resolve(__dirname, '../client/components', file),
|
|
33
|
-
])),
|
|
34
|
-
// use alias to make all composables replaceable
|
|
35
|
-
...Object.fromEntries(fs
|
|
36
|
-
.readdirSync(path.resolve(__dirname, '../client/composables'))
|
|
37
|
-
.filter((file) => file.endsWith('.js'))
|
|
38
|
-
.map((file) => [
|
|
39
|
-
`@theme/${file.slice(0, -3)}`,
|
|
40
|
-
path.resolve(__dirname, '../client/composables', file),
|
|
41
|
-
])),
|
|
42
|
-
// use alias to make all utils replaceable
|
|
43
|
-
...Object.fromEntries(fs
|
|
44
|
-
.readdirSync(path.resolve(__dirname, '../client/utils'))
|
|
45
|
-
.filter((file) => file.endsWith('.js'))
|
|
46
|
-
.map((file) => [
|
|
47
|
-
`@theme/${file.slice(0, -3)}`,
|
|
48
|
-
path.resolve(__dirname, '../client/utils', file),
|
|
49
|
-
])),
|
|
50
|
-
},
|
|
51
|
-
clientConfigFile: path.resolve(__dirname, '../client/config.js'),
|
|
52
|
-
extendsBundlerOptions: (bundlerOptions, app) => {
|
|
53
|
-
// ensure theme alias is not optimized by Vite
|
|
54
|
-
addViteOptimizeDepsExclude(bundlerOptions, app, '@theme');
|
|
55
|
-
},
|
|
56
|
-
extendsPage: (page) => {
|
|
57
|
-
// save relative file path into page data to generate edit link
|
|
58
|
-
page.data.filePathRelative = page.filePathRelative;
|
|
59
|
-
// save title into route meta to generate navbar and sidebar
|
|
60
|
-
page.routeMeta.title = page.title;
|
|
61
|
-
},
|
|
62
|
-
plugins: [
|
|
63
|
-
// @vuepress/plugin-active-header-link
|
|
64
|
-
(themePlugins.activeHeaderLinks ?? true)
|
|
65
|
-
? activeHeaderLinksPlugin({
|
|
66
|
-
// should greater than page transition duration
|
|
67
|
-
delay: 300,
|
|
68
|
-
})
|
|
69
|
-
: [],
|
|
70
|
-
// @vuepress/plugin-back-to-top
|
|
71
|
-
(themePlugins.backToTop ?? true)
|
|
72
|
-
? backToTopPlugin(isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {})
|
|
73
|
-
: [],
|
|
74
|
-
// @vuepress/plugin-copy-code
|
|
75
|
-
(themePlugins.copyCode ?? true)
|
|
76
|
-
? copyCodePlugin({
|
|
77
|
-
...(isPlainObject(themePlugins.copyCode)
|
|
78
|
-
? themePlugins.copyCode
|
|
79
|
-
: {}),
|
|
80
|
-
})
|
|
81
|
-
: [],
|
|
82
|
-
// @vuepress/plugin-markdown-container
|
|
83
|
-
(themePlugins.hint ?? true)
|
|
84
|
-
? markdownHintPlugin({
|
|
85
|
-
locales: resolveMarkdownHintLocales(localeOptions),
|
|
86
|
-
...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),
|
|
87
|
-
})
|
|
88
|
-
: [],
|
|
89
|
-
// @vuepress/plugin-git
|
|
90
|
-
(themePlugins.git ?? true)
|
|
91
|
-
? gitPlugin({
|
|
92
|
-
createdTime: false,
|
|
93
|
-
updatedTime: localeOptions.lastUpdated ?? true,
|
|
94
|
-
changelog: { repoUrl: localeOptions.repo || '' },
|
|
95
|
-
...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),
|
|
96
|
-
})
|
|
97
|
-
: [],
|
|
98
|
-
// @vuepress/plugin-links-check
|
|
99
|
-
(themePlugins.linksCheck ?? true)
|
|
100
|
-
? linksCheckPlugin(isPlainObject(themePlugins.linksCheck)
|
|
101
|
-
? themePlugins.linksCheck
|
|
102
|
-
: {})
|
|
103
|
-
: [],
|
|
104
|
-
// @vuepress/plugin-medium-zoom
|
|
105
|
-
(themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],
|
|
106
|
-
// @vuepress/plugin-nprogress
|
|
107
|
-
(themePlugins.nprogress ?? true) ? nprogressPlugin() : [],
|
|
108
|
-
// @vuepress/plugin-palette
|
|
109
|
-
palettePlugin({ preset: 'sass' }),
|
|
110
|
-
// @vuepress/plugin-prismjs
|
|
111
|
-
(themePlugins.prismjs ?? true)
|
|
112
|
-
? prismjsPlugin(isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {})
|
|
113
|
-
: [],
|
|
114
|
-
// @vuepress/plugin-seo
|
|
115
|
-
hostname && (themePlugins.seo ?? true)
|
|
116
|
-
? seoPlugin({
|
|
117
|
-
hostname,
|
|
118
|
-
...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),
|
|
119
|
-
})
|
|
120
|
-
: [],
|
|
121
|
-
// @vuepress/plugin-sitemap
|
|
122
|
-
hostname && (themePlugins.sitemap ?? true)
|
|
123
|
-
? sitemapPlugin({
|
|
124
|
-
hostname,
|
|
125
|
-
...(isPlainObject(themePlugins.sitemap)
|
|
126
|
-
? themePlugins.sitemap
|
|
127
|
-
: {}),
|
|
128
|
-
})
|
|
129
|
-
: [],
|
|
130
|
-
// @vuepress/plugin-markdown-tab
|
|
131
|
-
(themePlugins.tab ?? true)
|
|
132
|
-
? markdownTabPlugin(isPlainObject(themePlugins.tab)
|
|
133
|
-
? themePlugins.tab
|
|
134
|
-
: { codeTabs: true, tabs: true })
|
|
135
|
-
: [],
|
|
136
|
-
// @vuepress/plugin-theme-data
|
|
137
|
-
themeDataPlugin({ themeData: localeOptions }),
|
|
138
|
-
],
|
|
139
|
-
};
|
|
140
|
-
};
|
package/lib/node/index.d.ts
DELETED
package/lib/node/index.js
DELETED
package/lib/node/typings.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { BackToTopPluginOptions } from '@vuepress/plugin-back-to-top';
|
|
2
|
-
import type { CopyCodePluginOptions } from '@vuepress/plugin-copy-code';
|
|
3
|
-
import type { GitPluginOptions } from '@vuepress/plugin-git';
|
|
4
|
-
import type { LinksCheckPluginOptions } from '@vuepress/plugin-links-check';
|
|
5
|
-
import type { MarkdownHintPluginOptions } from '@vuepress/plugin-markdown-hint';
|
|
6
|
-
import type { MarkdownTabPluginOptions } from '@vuepress/plugin-markdown-tab';
|
|
7
|
-
import type { PrismjsPluginOptions } from '@vuepress/plugin-prismjs';
|
|
8
|
-
import type { SeoPluginOptions } from '@vuepress/plugin-seo';
|
|
9
|
-
import type { SitemapPluginOptions } from '@vuepress/plugin-sitemap';
|
|
10
|
-
export interface DefaultThemePluginsOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Enable `@vuepress/plugin-active-header-links` or not
|
|
13
|
-
*/
|
|
14
|
-
activeHeaderLinks?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Enable `@vuepress/plugin-back-to-top` or not
|
|
17
|
-
*/
|
|
18
|
-
backToTop?: BackToTopPluginOptions | boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Enable `@vuepress/plugin-copy-code` or not
|
|
21
|
-
*/
|
|
22
|
-
copyCode?: CopyCodePluginOptions | boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Enable `@vuepress/plugin-git` or not
|
|
25
|
-
*/
|
|
26
|
-
git?: GitPluginOptions | boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Enable `@vuepress/plugin-markdown-hint` or not
|
|
29
|
-
*/
|
|
30
|
-
hint?: MarkdownHintPluginOptions | boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Enable `@vuepress/plugin-links-check` or not
|
|
33
|
-
*/
|
|
34
|
-
linksCheck?: LinksCheckPluginOptions | boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Enable `@vuepress/plugin-medium-zoom` or not
|
|
37
|
-
*/
|
|
38
|
-
mediumZoom?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Enable `@vuepress/plugin-nprogress` or not
|
|
41
|
-
*/
|
|
42
|
-
nprogress?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Enable `@vuepress/plugin-prismjs` or not
|
|
45
|
-
*/
|
|
46
|
-
prismjs?: PrismjsPluginOptions | boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Enable `@vuepress/plugin-seo` or not
|
|
49
|
-
*/
|
|
50
|
-
seo?: Partial<SeoPluginOptions> | boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Enable `@vuepress/plugin-sitemap` or not
|
|
53
|
-
*/
|
|
54
|
-
sitemap?: Partial<SitemapPluginOptions> | boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Enable `@vuepress/plugin-markdown-tab` or not
|
|
57
|
-
*/
|
|
58
|
-
tab?: MarkdownTabPluginOptions | boolean;
|
|
59
|
-
}
|
package/lib/node/typings.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DefaultThemeLocaleData, DefaultThemeLocaleOptions } from '../../shared/index.js';
|
|
2
|
-
export declare const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions;
|
|
3
|
-
export declare const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData;
|
|
4
|
-
/**
|
|
5
|
-
* Assign default options
|
|
6
|
-
*/
|
|
7
|
-
export declare const assignDefaultLocaleOptions: (localeOptions: DefaultThemeLocaleOptions) => void;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_LOCALE_OPTIONS = {
|
|
2
|
-
// color mode
|
|
3
|
-
colorMode: 'auto',
|
|
4
|
-
colorModeSwitch: true,
|
|
5
|
-
// navbar
|
|
6
|
-
navbar: [],
|
|
7
|
-
logo: null,
|
|
8
|
-
repo: null,
|
|
9
|
-
selectLanguageText: 'Languages',
|
|
10
|
-
selectLanguageAriaLabel: 'Select language',
|
|
11
|
-
// sidebar
|
|
12
|
-
sidebar: 'heading',
|
|
13
|
-
sidebarDepth: 2,
|
|
14
|
-
// page meta
|
|
15
|
-
editLink: true,
|
|
16
|
-
editLinkText: 'Edit this page',
|
|
17
|
-
lastUpdated: true,
|
|
18
|
-
contributors: true,
|
|
19
|
-
contributorsText: 'Contributors',
|
|
20
|
-
// 404 page messages
|
|
21
|
-
notFound: [
|
|
22
|
-
`There's nothing here.`,
|
|
23
|
-
`How did we get here?`,
|
|
24
|
-
`That's a Four-Oh-Four.`,
|
|
25
|
-
`Looks like we've got some broken links.`,
|
|
26
|
-
],
|
|
27
|
-
backToHome: 'Take me home',
|
|
28
|
-
// a11y
|
|
29
|
-
openInNewWindow: 'open in new window',
|
|
30
|
-
toggleColorMode: 'toggle color mode',
|
|
31
|
-
toggleSidebar: 'toggle sidebar',
|
|
32
|
-
};
|
|
33
|
-
export const DEFAULT_LOCALE_DATA = {
|
|
34
|
-
// navbar
|
|
35
|
-
selectLanguageName: 'English',
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Assign default options
|
|
39
|
-
*/
|
|
40
|
-
export const assignDefaultLocaleOptions = (localeOptions) => {
|
|
41
|
-
localeOptions.locales ??= {};
|
|
42
|
-
Object.assign(localeOptions, {
|
|
43
|
-
...DEFAULT_LOCALE_OPTIONS,
|
|
44
|
-
...localeOptions,
|
|
45
|
-
});
|
|
46
|
-
localeOptions.locales['/'] ??= {};
|
|
47
|
-
Object.assign(localeOptions.locales['/'], {
|
|
48
|
-
...DEFAULT_LOCALE_DATA,
|
|
49
|
-
...localeOptions.locales['/'],
|
|
50
|
-
});
|
|
51
|
-
};
|
package/lib/node/utils/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint';
|
|
2
|
-
import type { LocaleConfig } from 'vuepress/shared';
|
|
3
|
-
import type { DefaultThemeData } from '../../shared/index.js';
|
|
4
|
-
/**
|
|
5
|
-
* Resolve options for `@vuepress/plugin-markdown-container`
|
|
6
|
-
*
|
|
7
|
-
* For custom containers default title
|
|
8
|
-
*
|
|
9
|
-
* @param localeOptions - Locales config from theme options
|
|
10
|
-
* @returns Locales config for `@vuepress/plugin-markdown-container`
|
|
11
|
-
*/
|
|
12
|
-
export declare const resolveMarkdownHintLocales: (localeOptions: DefaultThemeData) => LocaleConfig<MarkdownHintPluginLocaleData>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve options for `@vuepress/plugin-markdown-container`
|
|
3
|
-
*
|
|
4
|
-
* For custom containers default title
|
|
5
|
-
*
|
|
6
|
-
* @param localeOptions - Locales config from theme options
|
|
7
|
-
* @returns Locales config for `@vuepress/plugin-markdown-container`
|
|
8
|
-
*/
|
|
9
|
-
export const resolveMarkdownHintLocales = (localeOptions) => Object.entries(localeOptions.locales ?? {}).reduce((result, [key, value]) => {
|
|
10
|
-
result[key] = {};
|
|
11
|
-
if (value.tip)
|
|
12
|
-
result[key].tip = value.tip;
|
|
13
|
-
if (value.warning)
|
|
14
|
-
result[key].warning = value.warning;
|
|
15
|
-
if (value.danger)
|
|
16
|
-
result[key].caution = value.danger;
|
|
17
|
-
if (value.important)
|
|
18
|
-
result[key].important = value.important;
|
|
19
|
-
if (value.note)
|
|
20
|
-
result[key].note = value.note;
|
|
21
|
-
return result;
|
|
22
|
-
}, {});
|
package/lib/shared/index.d.ts
DELETED
package/lib/shared/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/shared/nav.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base nav item, displayed as text
|
|
3
|
-
*/
|
|
4
|
-
export interface NavItemOptions {
|
|
5
|
-
text: string;
|
|
6
|
-
ariaLabel?: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Options for `<AutoLink>`
|
|
10
|
-
*/
|
|
11
|
-
export interface AutoLinkOptions extends NavItemOptions {
|
|
12
|
-
/**
|
|
13
|
-
* Link of item
|
|
14
|
-
*/
|
|
15
|
-
link: string;
|
|
16
|
-
/**
|
|
17
|
-
* Rel of `<a>` tag
|
|
18
|
-
*/
|
|
19
|
-
rel?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Target of `<a>` tag
|
|
22
|
-
*/
|
|
23
|
-
target?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Regexp mode to be active
|
|
26
|
-
*/
|
|
27
|
-
activeMatch?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Whether it's active only when exact match
|
|
30
|
-
*/
|
|
31
|
-
exact?: boolean;
|
|
32
|
-
}
|
package/lib/shared/nav.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/shared/navbar.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AutoLinkOptions, NavItemOptions } from './nav.js';
|
|
2
|
-
/**
|
|
3
|
-
* Base nav group, has nav items children
|
|
4
|
-
*/
|
|
5
|
-
export interface NavGroup<T> extends NavItemOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Link prefix of current group
|
|
8
|
-
*/
|
|
9
|
-
prefix?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Link of current group
|
|
12
|
-
*/
|
|
13
|
-
link?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Children of current group
|
|
16
|
-
*/
|
|
17
|
-
children: T[];
|
|
18
|
-
}
|
|
19
|
-
export type NavbarLinkOptions = AutoLinkOptions | string;
|
|
20
|
-
export type NavbarGroupOptions = NavGroup<NavbarLinkOptions | NavGroup<NavbarLinkOptions>>;
|
|
21
|
-
export type NavbarOptions = (NavbarGroupOptions | NavbarLinkOptions)[] | false;
|
package/lib/shared/navbar.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/shared/options.d.ts
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import type { ThemeData } from '@vuepress/plugin-theme-data';
|
|
2
|
-
import type { LocaleData } from 'vuepress/shared';
|
|
3
|
-
import type { NavbarOptions } from './navbar.js';
|
|
4
|
-
import type { SidebarOptions } from './sidebar.js';
|
|
5
|
-
export type DefaultThemeLocaleOptions = DefaultThemeData;
|
|
6
|
-
export type DefaultThemeData = ThemeData<DefaultThemeLocaleData>;
|
|
7
|
-
export interface DefaultThemeLocaleData extends LocaleData {
|
|
8
|
-
/**
|
|
9
|
-
* Default color mode
|
|
10
|
-
*
|
|
11
|
-
* @default 'auto'
|
|
12
|
-
*/
|
|
13
|
-
colorMode?: 'auto' | 'dark' | 'light';
|
|
14
|
-
/**
|
|
15
|
-
* Enable color mode switching and display a button in navbar or not
|
|
16
|
-
*
|
|
17
|
-
* @default true
|
|
18
|
-
*/
|
|
19
|
-
colorModeSwitch?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Whether show external link icon
|
|
22
|
-
*
|
|
23
|
-
* @default true
|
|
24
|
-
*/
|
|
25
|
-
externalLinkIcon?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Home path of current locale
|
|
28
|
-
*
|
|
29
|
-
* Used as the link of back-to-home and navbar logo
|
|
30
|
-
*/
|
|
31
|
-
home?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Navbar config
|
|
34
|
-
*
|
|
35
|
-
* Set to `false` to disable navbar in current locale
|
|
36
|
-
*/
|
|
37
|
-
navbar?: NavbarOptions;
|
|
38
|
-
/**
|
|
39
|
-
* Navbar label used for screen readers using the `aria-label` attribute
|
|
40
|
-
*/
|
|
41
|
-
navbarLabel?: string | null;
|
|
42
|
-
/**
|
|
43
|
-
* Page navbar label used for screen readers using the `aria-label` attribute
|
|
44
|
-
*/
|
|
45
|
-
pageNavbarLabel?: string | null;
|
|
46
|
-
/**
|
|
47
|
-
* Navbar logo config
|
|
48
|
-
*
|
|
49
|
-
* Logo to display in navbar
|
|
50
|
-
*/
|
|
51
|
-
logo?: string | null;
|
|
52
|
-
/**
|
|
53
|
-
* Navbar logo config for dark mode
|
|
54
|
-
*
|
|
55
|
-
* Logo to display in navbar in dark mode
|
|
56
|
-
*/
|
|
57
|
-
logoDark?: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* The alt text of navbar logo.
|
|
60
|
-
* Defaults to the site title if not specified.
|
|
61
|
-
* If the value is the same as the site title, the site title rendered in the navbar will be
|
|
62
|
-
* hidden from screen readers to avoid duplication.
|
|
63
|
-
*/
|
|
64
|
-
logoAlt?: string | null;
|
|
65
|
-
/**
|
|
66
|
-
* Navbar repository config
|
|
67
|
-
*
|
|
68
|
-
* Used for the repository link of navbar
|
|
69
|
-
*/
|
|
70
|
-
repo?: string | null;
|
|
71
|
-
/**
|
|
72
|
-
* Navbar repository config
|
|
73
|
-
*
|
|
74
|
-
* Used for the repository text of navbar
|
|
75
|
-
*/
|
|
76
|
-
repoLabel?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Navbar language selection config
|
|
79
|
-
*
|
|
80
|
-
* Text of the language selection dropdown
|
|
81
|
-
*/
|
|
82
|
-
selectLanguageText?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Navbar language selection config
|
|
85
|
-
*
|
|
86
|
-
* Aria label of of the language selection dropdown
|
|
87
|
-
*/
|
|
88
|
-
selectLanguageAriaLabel?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Navbar language selection config
|
|
91
|
-
*
|
|
92
|
-
* Language name of current locale
|
|
93
|
-
*
|
|
94
|
-
* Displayed inside the language selection dropdown
|
|
95
|
-
*/
|
|
96
|
-
selectLanguageName?: string;
|
|
97
|
-
/**
|
|
98
|
-
* Sidebar config
|
|
99
|
-
*
|
|
100
|
-
* Set to `false` to disable sidebar in current locale
|
|
101
|
-
*/
|
|
102
|
-
sidebar?: SidebarOptions | false;
|
|
103
|
-
/**
|
|
104
|
-
* Sidebar depth
|
|
105
|
-
*
|
|
106
|
-
* - Set to `0` to disable all levels
|
|
107
|
-
* - Set to `1` to include `<h2>`
|
|
108
|
-
* - Set to `2` to include `<h2>` and `<h3>`
|
|
109
|
-
* - ...
|
|
110
|
-
*
|
|
111
|
-
* The max value depends on which headers you have extracted
|
|
112
|
-
* via `markdown.headers.level`.
|
|
113
|
-
*
|
|
114
|
-
* The default value of `markdown.headers.level` is `[2, 3]`,
|
|
115
|
-
* so the default max value of `sidebarDepth` is `2`
|
|
116
|
-
*/
|
|
117
|
-
sidebarDepth?: number;
|
|
118
|
-
/**
|
|
119
|
-
* Page meta - edit link config
|
|
120
|
-
*
|
|
121
|
-
* Whether to show "Edit this page" or not
|
|
122
|
-
*/
|
|
123
|
-
editLink?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Page meta - edit link config
|
|
126
|
-
*
|
|
127
|
-
* The text to replace the default "Edit this page"
|
|
128
|
-
*/
|
|
129
|
-
editLinkText?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Page meta - edit link config
|
|
132
|
-
*
|
|
133
|
-
* Pattern of edit link
|
|
134
|
-
*
|
|
135
|
-
* @example ':repo/edit/:branch/:path'
|
|
136
|
-
*/
|
|
137
|
-
editLinkPattern?: string;
|
|
138
|
-
/**
|
|
139
|
-
* Page meta - edit link config
|
|
140
|
-
*
|
|
141
|
-
* Use `repo` config by default
|
|
142
|
-
*
|
|
143
|
-
* Set this config if your docs is placed in a different repo
|
|
144
|
-
*/
|
|
145
|
-
docsRepo?: string;
|
|
146
|
-
/**
|
|
147
|
-
* Page meta - edit link config
|
|
148
|
-
*
|
|
149
|
-
* Set this config if the branch of your docs is not 'main'
|
|
150
|
-
*/
|
|
151
|
-
docsBranch?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Page meta - edit link config
|
|
154
|
-
*
|
|
155
|
-
* Set this config if your docs is placed in sub dir of your `docsRepo`
|
|
156
|
-
*/
|
|
157
|
-
docsDir?: string;
|
|
158
|
-
/**
|
|
159
|
-
* Page meta - last updated config
|
|
160
|
-
*
|
|
161
|
-
* Whether to show "Last Updated" or not
|
|
162
|
-
*/
|
|
163
|
-
lastUpdated?: boolean;
|
|
164
|
-
/**
|
|
165
|
-
* Page meta - last updated config
|
|
166
|
-
*
|
|
167
|
-
* The text to replace the default "Last Updated"
|
|
168
|
-
*/
|
|
169
|
-
lastUpdatedText?: string;
|
|
170
|
-
/**
|
|
171
|
-
* Page meta - contributors config
|
|
172
|
-
*
|
|
173
|
-
* Whether to show "Contributors" or not
|
|
174
|
-
*/
|
|
175
|
-
contributors?: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Page meta - contributors config
|
|
178
|
-
*
|
|
179
|
-
* The text to replace the default "Contributors"
|
|
180
|
-
*/
|
|
181
|
-
contributorsText?: string;
|
|
182
|
-
/**
|
|
183
|
-
* Custom block config
|
|
184
|
-
*
|
|
185
|
-
* Default title of TIP custom block
|
|
186
|
-
*/
|
|
187
|
-
tip?: string;
|
|
188
|
-
/**
|
|
189
|
-
* Custom block config
|
|
190
|
-
*
|
|
191
|
-
* Default title of WARNING custom block
|
|
192
|
-
*/
|
|
193
|
-
warning?: string;
|
|
194
|
-
/**
|
|
195
|
-
* Custom block config
|
|
196
|
-
*
|
|
197
|
-
* Default title of DANGER custom block
|
|
198
|
-
*/
|
|
199
|
-
danger?: string;
|
|
200
|
-
/**
|
|
201
|
-
* Custom block config
|
|
202
|
-
*
|
|
203
|
-
* Default title of IMPORTANT custom block
|
|
204
|
-
*/
|
|
205
|
-
important?: string;
|
|
206
|
-
/**
|
|
207
|
-
* Custom block config
|
|
208
|
-
*
|
|
209
|
-
* Default title of NOTE custom block
|
|
210
|
-
*/
|
|
211
|
-
note?: string;
|
|
212
|
-
/**
|
|
213
|
-
* 404 page config
|
|
214
|
-
*
|
|
215
|
-
* Not Found messages for 404 page
|
|
216
|
-
*/
|
|
217
|
-
notFound?: string[];
|
|
218
|
-
/**
|
|
219
|
-
* 404 page config
|
|
220
|
-
*
|
|
221
|
-
* Text of back-to-home link in 404 page
|
|
222
|
-
*/
|
|
223
|
-
backToHome?: string;
|
|
224
|
-
/**
|
|
225
|
-
* A11y text for external link icon
|
|
226
|
-
*/
|
|
227
|
-
openInNewWindow?: string;
|
|
228
|
-
/**
|
|
229
|
-
* A11y text for color mode toggle button
|
|
230
|
-
*/
|
|
231
|
-
toggleColorMode?: string;
|
|
232
|
-
/**
|
|
233
|
-
* A11y text for sidebar toggle button
|
|
234
|
-
*/
|
|
235
|
-
toggleSidebar?: string;
|
|
236
|
-
/**
|
|
237
|
-
* text for prev link
|
|
238
|
-
*/
|
|
239
|
-
prev?: string | false;
|
|
240
|
-
/**
|
|
241
|
-
* text for next link
|
|
242
|
-
*/
|
|
243
|
-
next?: string | false;
|
|
244
|
-
}
|
package/lib/shared/options.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/shared/page.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { GitPluginPageData } from '@vuepress/plugin-git';
|
|
2
|
-
import type { PageFrontmatter } from 'vuepress/shared';
|
|
3
|
-
import type { AutoLinkOptions } from './nav.js';
|
|
4
|
-
import type { SidebarArrayOptions } from './sidebar.js';
|
|
5
|
-
export interface DefaultThemePageData extends Partial<GitPluginPageData> {
|
|
6
|
-
filePathRelative: string | null;
|
|
7
|
-
}
|
|
8
|
-
export interface DefaultThemePageFrontmatter extends PageFrontmatter {
|
|
9
|
-
home?: boolean;
|
|
10
|
-
navbar?: boolean;
|
|
11
|
-
pageClass?: string;
|
|
12
|
-
externalLinkIcon?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface DefaultThemeHomePageFrontmatter extends DefaultThemePageFrontmatter {
|
|
15
|
-
home: true;
|
|
16
|
-
heroImage?: string;
|
|
17
|
-
heroImageDark?: string;
|
|
18
|
-
heroAlt?: string;
|
|
19
|
-
heroHeight?: number;
|
|
20
|
-
heroText?: string | null;
|
|
21
|
-
tagline?: string | null;
|
|
22
|
-
actions?: {
|
|
23
|
-
text: string;
|
|
24
|
-
link: string;
|
|
25
|
-
type?: 'primary' | 'secondary';
|
|
26
|
-
}[];
|
|
27
|
-
features?: {
|
|
28
|
-
title: string;
|
|
29
|
-
details: string;
|
|
30
|
-
}[];
|
|
31
|
-
footer?: string;
|
|
32
|
-
footerHtml?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter {
|
|
35
|
-
home?: false;
|
|
36
|
-
editLink?: boolean;
|
|
37
|
-
editLinkPattern?: string;
|
|
38
|
-
lastUpdated?: boolean;
|
|
39
|
-
contributors?: boolean;
|
|
40
|
-
sidebar?: SidebarArrayOptions | 'heading' | false;
|
|
41
|
-
sidebarDepth?: number;
|
|
42
|
-
prev?: AutoLinkOptions | string;
|
|
43
|
-
next?: AutoLinkOptions | string;
|
|
44
|
-
}
|
package/lib/shared/page.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|