@vuepress/theme-default 2.0.0-beta.26 → 2.0.0-beta.27
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/components/Navbar.vue +9 -6
- package/lib/client/components/NavbarLinks.vue +1 -1
- package/lib/client/components/PageMeta.vue +3 -2
- package/lib/client/components/global/CodeGroup.d.ts +1 -1
- package/lib/client/composables/useSidebarItems.d.ts +1 -1
- package/lib/client/index.d.ts +1 -1
- package/lib/client/styles/code.scss +1 -0
- package/lib/client/styles/home.scss +7 -4
- package/lib/client/utils/resolveEditLink.js +1 -1
- package/lib/node/defaultTheme.js +10 -10
- package/lib/node/utils/resolveContainerPluginOptions.d.ts +1 -1
- package/lib/node/utils/resolveGitPluginOptions.d.ts +1 -1
- package/lib/shared/page.d.ts +1 -0
- package/package.json +20 -20
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
<span ref="siteBrand">
|
|
6
6
|
<RouterLink :to="siteBrandLink">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
<!-- logo could be different in dark mode, so we make it client-only to avoid ssr-mismatch -->
|
|
8
|
+
<ClientOnly>
|
|
9
|
+
<img
|
|
10
|
+
v-if="siteBrandLogo"
|
|
11
|
+
class="logo"
|
|
12
|
+
:src="withBase(siteBrandLogo)"
|
|
13
|
+
:alt="siteBrandTitle"
|
|
14
|
+
/>
|
|
15
|
+
</ClientOnly>
|
|
13
16
|
|
|
14
17
|
<span
|
|
15
18
|
v-if="siteBrandTitle"
|
|
@@ -14,7 +14,7 @@ import { isLinkHttp, isString } from '@vuepress/shared'
|
|
|
14
14
|
import { computed } from 'vue'
|
|
15
15
|
import type { ComputedRef } from 'vue'
|
|
16
16
|
import { useRouter } from 'vue-router'
|
|
17
|
-
import type {
|
|
17
|
+
import type { NavbarGroup, NavbarItem, ResolvedNavbarItem } from '../../shared'
|
|
18
18
|
import { useNavLink, useThemeLocaleData } from '../composables'
|
|
19
19
|
import { resolveRepoType } from '../utils'
|
|
20
20
|
import DropdownLink from './DropdownLink.vue'
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
import { computed } from 'vue'
|
|
36
36
|
import type { ComputedRef } from 'vue'
|
|
37
37
|
import type {
|
|
38
|
-
DefaultThemePageData,
|
|
39
38
|
DefaultThemeNormalPageFrontmatter,
|
|
39
|
+
DefaultThemePageData,
|
|
40
40
|
NavLink as NavLinkType,
|
|
41
41
|
} from '../../shared'
|
|
42
42
|
import { useThemeLocaleData } from '../composables'
|
|
@@ -70,7 +70,8 @@ const useEditNavLink = (): ComputedRef<null | NavLinkType> => {
|
|
|
70
70
|
docsBranch,
|
|
71
71
|
docsDir,
|
|
72
72
|
filePathRelative: page.value.filePathRelative,
|
|
73
|
-
editLinkPattern:
|
|
73
|
+
editLinkPattern:
|
|
74
|
+
frontmatter.value.editLinkPattern ?? themeLocale.value.editLinkPattern,
|
|
74
75
|
})
|
|
75
76
|
|
|
76
77
|
if (!editLink) return null
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3
3
|
[key: string]: any;
|
|
4
|
-
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}
|
|
4
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PageHeader } from '@vuepress/client';
|
|
2
2
|
import type { ComputedRef, InjectionKey } from 'vue';
|
|
3
|
-
import type { DefaultThemeData, DefaultThemeNormalPageFrontmatter, SidebarConfigArray, SidebarConfigObject
|
|
3
|
+
import type { DefaultThemeData, DefaultThemeNormalPageFrontmatter, ResolvedSidebarItem, SidebarConfigArray, SidebarConfigObject } from '../../shared';
|
|
4
4
|
export declare type SidebarItemsRef = ComputedRef<ResolvedSidebarItem[]>;
|
|
5
5
|
export declare const sidebarItemsSymbol: InjectionKey<SidebarItemsRef>;
|
|
6
6
|
/**
|
package/lib/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemePluginsOptions, NavbarConfig, NavbarGroup, NavbarItem, NavGroup, NavItem, NavLink, ResolvedNavbarItem, ResolvedSidebarItem, SidebarConfig, SidebarConfigArray, SidebarConfigObject, SidebarItem } from '../shared';
|
|
2
2
|
export type { NavItem, NavGroup, NavLink, NavbarItem, NavbarGroup, NavbarConfig, ResolvedNavbarItem, SidebarItem, SidebarConfigArray, SidebarConfigObject, SidebarConfig, ResolvedSidebarItem, DefaultThemePluginsOptions, DefaultThemeLocaleOptions, DefaultThemeData, DefaultThemeLocaleData, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemeHomePageFrontmatter, DefaultThemeNormalPageFrontmatter, };
|
|
3
3
|
export * from './composables';
|
|
4
4
|
export * from './utils';
|
|
@@ -26,6 +26,13 @@
|
|
|
26
26
|
margin: 1.8rem auto;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.actions {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
gap: 1rem;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
29
36
|
.description {
|
|
30
37
|
max-width: 35rem;
|
|
31
38
|
font-size: 1.6rem;
|
|
@@ -43,10 +50,6 @@
|
|
|
43
50
|
transition: background-color var(--t-color);
|
|
44
51
|
box-sizing: border-box;
|
|
45
52
|
|
|
46
|
-
&:not(:first-child) {
|
|
47
|
-
margin-left: 1.5rem;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
53
|
&.primary {
|
|
51
54
|
color: var(--c-bg);
|
|
52
55
|
background-color: var(--c-brand);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isLinkHttp,
|
|
1
|
+
import { isLinkHttp, removeEndingSlash, removeLeadingSlash, } from '@vuepress/shared';
|
|
2
2
|
import { resolveRepoType } from './resolveRepoType';
|
|
3
3
|
export const editLinkPatterns = {
|
|
4
4
|
GitHub: ':repo/edit/:branch/:path',
|
package/lib/node/defaultTheme.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.defaultTheme = void 0;
|
|
|
4
4
|
const utils_1 = require("@vuepress/utils");
|
|
5
5
|
const utils_2 = require("./utils");
|
|
6
6
|
const defaultTheme = ({ themePlugins = {}, ...localeOptions }) => {
|
|
7
|
-
utils_2.assignDefaultLocaleOptions(localeOptions);
|
|
7
|
+
(0, utils_2.assignDefaultLocaleOptions)(localeOptions);
|
|
8
8
|
return {
|
|
9
9
|
name: '@vuepress/theme-default',
|
|
10
10
|
layouts: utils_1.path.resolve(__dirname, '../client/layouts'),
|
|
@@ -15,35 +15,35 @@ const defaultTheme = ({ themePlugins = {}, ...localeOptions }) => {
|
|
|
15
15
|
plugins: [
|
|
16
16
|
[
|
|
17
17
|
'@vuepress/active-header-links',
|
|
18
|
-
utils_2.resolveActiveHeaderLinksPluginOptions(themePlugins),
|
|
18
|
+
(0, utils_2.resolveActiveHeaderLinksPluginOptions)(themePlugins),
|
|
19
19
|
],
|
|
20
20
|
['@vuepress/back-to-top', themePlugins.backToTop !== false],
|
|
21
21
|
[
|
|
22
22
|
'@vuepress/container',
|
|
23
|
-
utils_2.resolveContainerPluginOptions(themePlugins, localeOptions, 'tip'),
|
|
23
|
+
(0, utils_2.resolveContainerPluginOptions)(themePlugins, localeOptions, 'tip'),
|
|
24
24
|
],
|
|
25
25
|
[
|
|
26
26
|
'@vuepress/container',
|
|
27
|
-
utils_2.resolveContainerPluginOptions(themePlugins, localeOptions, 'warning'),
|
|
27
|
+
(0, utils_2.resolveContainerPluginOptions)(themePlugins, localeOptions, 'warning'),
|
|
28
28
|
],
|
|
29
29
|
[
|
|
30
30
|
'@vuepress/container',
|
|
31
|
-
utils_2.resolveContainerPluginOptions(themePlugins, localeOptions, 'danger'),
|
|
31
|
+
(0, utils_2.resolveContainerPluginOptions)(themePlugins, localeOptions, 'danger'),
|
|
32
32
|
],
|
|
33
33
|
[
|
|
34
34
|
'@vuepress/container',
|
|
35
|
-
utils_2.resolveContainerPluginOptionsForDetails(themePlugins),
|
|
35
|
+
(0, utils_2.resolveContainerPluginOptionsForDetails)(themePlugins),
|
|
36
36
|
],
|
|
37
37
|
[
|
|
38
38
|
'@vuepress/container',
|
|
39
|
-
utils_2.resolveContainerPluginOptionsForCodeGroup(themePlugins),
|
|
39
|
+
(0, utils_2.resolveContainerPluginOptionsForCodeGroup)(themePlugins),
|
|
40
40
|
],
|
|
41
41
|
[
|
|
42
42
|
'@vuepress/container',
|
|
43
|
-
utils_2.resolveContainerPluginOptionsForCodeGroupItem(themePlugins),
|
|
43
|
+
(0, utils_2.resolveContainerPluginOptionsForCodeGroupItem)(themePlugins),
|
|
44
44
|
],
|
|
45
|
-
['@vuepress/git', utils_2.resolveGitPluginOptions(themePlugins, localeOptions)],
|
|
46
|
-
['@vuepress/medium-zoom', utils_2.resolveMediumZoomPluginOptions(themePlugins)],
|
|
45
|
+
['@vuepress/git', (0, utils_2.resolveGitPluginOptions)(themePlugins, localeOptions)],
|
|
46
|
+
['@vuepress/medium-zoom', (0, utils_2.resolveMediumZoomPluginOptions)(themePlugins)],
|
|
47
47
|
['@vuepress/nprogress', themePlugins.nprogress !== false],
|
|
48
48
|
['@vuepress/palette', { preset: 'sass' }],
|
|
49
49
|
['@vuepress/prismjs', themePlugins.prismjs !== false],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContainerPluginOptions } from '@vuepress/plugin-container';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DefaultThemeData, DefaultThemePluginsOptions } from '../../shared';
|
|
3
3
|
/**
|
|
4
4
|
* Resolve options for @vuepress/plugin-container
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GitPluginOptions } from '@vuepress/plugin-git';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DefaultThemeLocaleOptions, DefaultThemePluginsOptions } from '../../shared';
|
|
3
3
|
/**
|
|
4
4
|
* Resolve options for @vuepress/plugin-git
|
|
5
5
|
*/
|
package/lib/shared/page.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface DefaultThemeHomePageFrontmatter extends DefaultThemePageFrontma
|
|
|
29
29
|
export interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter {
|
|
30
30
|
home?: false;
|
|
31
31
|
editLink?: boolean;
|
|
32
|
+
editLinkPattern?: string;
|
|
32
33
|
lastUpdated?: boolean;
|
|
33
34
|
contributors?: boolean;
|
|
34
35
|
sidebar?: 'auto' | false | SidebarConfig;
|
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.27",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -29,27 +29,27 @@
|
|
|
29
29
|
"copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
|
|
30
30
|
},
|
|
31
31
|
"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-git": "2.0.0-beta.
|
|
38
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-beta.
|
|
39
|
-
"@vuepress/plugin-nprogress": "2.0.0-beta.
|
|
40
|
-
"@vuepress/plugin-palette": "2.0.0-beta.
|
|
41
|
-
"@vuepress/plugin-prismjs": "2.0.0-beta.
|
|
42
|
-
"@vuepress/plugin-theme-data": "2.0.0-beta.
|
|
43
|
-
"@vuepress/shared": "2.0.0-beta.
|
|
44
|
-
"@vuepress/utils": "2.0.0-beta.
|
|
45
|
-
"@vueuse/core": "^6.
|
|
46
|
-
"sass": "^1.
|
|
47
|
-
"sass-loader": "^12.
|
|
48
|
-
"vue": "^3.2.
|
|
49
|
-
"vue-router": "^4.0.
|
|
32
|
+
"@vuepress/client": "2.0.0-beta.27",
|
|
33
|
+
"@vuepress/core": "2.0.0-beta.27",
|
|
34
|
+
"@vuepress/plugin-active-header-links": "2.0.0-beta.27",
|
|
35
|
+
"@vuepress/plugin-back-to-top": "2.0.0-beta.27",
|
|
36
|
+
"@vuepress/plugin-container": "2.0.0-beta.27",
|
|
37
|
+
"@vuepress/plugin-git": "2.0.0-beta.27",
|
|
38
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-beta.27",
|
|
39
|
+
"@vuepress/plugin-nprogress": "2.0.0-beta.27",
|
|
40
|
+
"@vuepress/plugin-palette": "2.0.0-beta.27",
|
|
41
|
+
"@vuepress/plugin-prismjs": "2.0.0-beta.27",
|
|
42
|
+
"@vuepress/plugin-theme-data": "2.0.0-beta.27",
|
|
43
|
+
"@vuepress/shared": "2.0.0-beta.27",
|
|
44
|
+
"@vuepress/utils": "2.0.0-beta.27",
|
|
45
|
+
"@vueuse/core": "^6.7.3",
|
|
46
|
+
"sass": "^1.43.4",
|
|
47
|
+
"sass-loader": "^12.2.0",
|
|
48
|
+
"vue": "^3.2.20",
|
|
49
|
+
"vue-router": "^4.0.12"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2671a94fe6864e215eb84f318b7e657744a0bc5d"
|
|
55
55
|
}
|