@vuepress/theme-default 2.0.0-rc.12 → 2.0.0-rc.15
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/AutoLink.vue +1 -2
- package/lib/client/components/NavbarDropdown.vue +1 -1
- package/lib/client/components/NavbarItems.vue +6 -2
- package/lib/client/components/PageNav.vue +2 -3
- package/lib/client/components/SidebarItem.vue +1 -1
- package/lib/client/components/SidebarItems.vue +1 -1
- package/lib/client/composables/useSidebarItems.js +1 -2
- package/lib/client/layouts/Layout.vue +1 -2
- package/lib/client/styles/navbar-dropdown.scss +2 -2
- package/lib/client/styles/navbar.scss +4 -4
- package/lib/client/styles/sidebar.scss +1 -1
- package/lib/client/styles/vars.scss +13 -8
- package/lib/client/utils/isActiveSidebarItem.d.ts +1 -1
- package/package.json +19 -20
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, toRefs } from 'vue'
|
|
3
3
|
import type { PropType } from 'vue'
|
|
4
|
-
import { useRoute } from '
|
|
5
|
-
import { useSiteData } from 'vuepress/client'
|
|
4
|
+
import { useRoute, useSiteData } from 'vuepress/client'
|
|
6
5
|
import { isLinkHttp, isLinkWithProtocol } from 'vuepress/shared'
|
|
7
6
|
import type { NavLink } from '../../shared/index.js'
|
|
8
7
|
|
|
@@ -3,7 +3,7 @@ import AutoLink from '@theme/AutoLink.vue'
|
|
|
3
3
|
import DropdownTransition from '@theme/DropdownTransition.vue'
|
|
4
4
|
import { computed, ref, toRefs, watch } from 'vue'
|
|
5
5
|
import type { PropType } from 'vue'
|
|
6
|
-
import { useRoute } from '
|
|
6
|
+
import { useRoute } from 'vuepress/client'
|
|
7
7
|
import type { NavbarItem, ResolvedNavbarItem } from '../../shared/index.js'
|
|
8
8
|
|
|
9
9
|
const props = defineProps({
|
|
@@ -4,8 +4,12 @@ import NavbarDropdown from '@theme/NavbarDropdown.vue'
|
|
|
4
4
|
import { useRoutePaths } from '@vuepress/helper/client'
|
|
5
5
|
import { computed, ref } from 'vue'
|
|
6
6
|
import type { ComputedRef } from 'vue'
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import {
|
|
8
|
+
useRoute,
|
|
9
|
+
useRouteLocale,
|
|
10
|
+
useSiteData,
|
|
11
|
+
useSiteLocaleData,
|
|
12
|
+
} from 'vuepress/client'
|
|
9
13
|
import { isLinkHttp, isString } from 'vuepress/shared'
|
|
10
14
|
import type {
|
|
11
15
|
NavbarGroup,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import AutoLink from '@theme/AutoLink.vue'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
|
-
import type { Router } from '
|
|
5
|
-
import { useRoute, useRouter } from '
|
|
6
|
-
import { usePageFrontmatter } from 'vuepress/client'
|
|
4
|
+
import type { Router } from 'vuepress/client'
|
|
5
|
+
import { usePageFrontmatter, useRoute, useRouter } from 'vuepress/client'
|
|
7
6
|
import { isPlainObject, isString } from 'vuepress/shared'
|
|
8
7
|
import type {
|
|
9
8
|
DefaultThemeNormalPageFrontmatter,
|
|
@@ -4,7 +4,7 @@ import DropdownTransition from '@theme/DropdownTransition.vue'
|
|
|
4
4
|
import { useToggle } from '@vueuse/core'
|
|
5
5
|
import { computed, nextTick, onBeforeUnmount, toRefs } from 'vue'
|
|
6
6
|
import type { PropType } from 'vue'
|
|
7
|
-
import { useRoute, useRouter } from '
|
|
7
|
+
import { useRoute, useRouter } from 'vuepress/client'
|
|
8
8
|
import type { ResolvedSidebarItem } from '../../shared/index.js'
|
|
9
9
|
import { isActiveSidebarItem } from '../utils/index.js'
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import SidebarItem from '@theme/SidebarItem.vue'
|
|
3
3
|
import { onMounted, watch } from 'vue'
|
|
4
|
-
import { useRoute } from '
|
|
4
|
+
import { useRoute } from 'vuepress/client'
|
|
5
5
|
import { useSidebarItems } from '../composables/index.js'
|
|
6
6
|
|
|
7
7
|
const route = useRoute()
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { computed, inject, provide } from 'vue';
|
|
2
|
-
import { useRoute } from '
|
|
3
|
-
import { usePageData, usePageFrontmatter } from 'vuepress/client';
|
|
2
|
+
import { usePageData, usePageFrontmatter, useRoute } from 'vuepress/client';
|
|
4
3
|
import { isPlainObject, isString, resolveLocalePath } from 'vuepress/shared';
|
|
5
4
|
import { getNavLink } from '../utils/index.js';
|
|
6
5
|
import { useThemeLocaleData } from './useThemeData.js';
|
|
@@ -4,8 +4,7 @@ import Navbar from '@theme/Navbar.vue'
|
|
|
4
4
|
import Page from '@theme/Page.vue'
|
|
5
5
|
import Sidebar from '@theme/Sidebar.vue'
|
|
6
6
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
7
|
-
import { useRouter } from '
|
|
8
|
-
import { usePageData, usePageFrontmatter } from 'vuepress/client'
|
|
7
|
+
import { usePageData, usePageFrontmatter, useRouter } from 'vuepress/client'
|
|
9
8
|
import type { DefaultThemePageFrontmatter } from '../../shared/index.js'
|
|
10
9
|
import {
|
|
11
10
|
useScrollPromise,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
& > a {
|
|
56
56
|
font-weight: inherit;
|
|
57
|
-
&.
|
|
57
|
+
&.route-link-active {
|
|
58
58
|
&::after {
|
|
59
59
|
display: none;
|
|
60
60
|
}
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
color: var(--c-text-accent);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
&.
|
|
87
|
+
&.route-link-active {
|
|
88
88
|
color: var(--c-text-accent);
|
|
89
89
|
|
|
90
90
|
&::after {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
color: inherit;
|
|
77
77
|
|
|
78
78
|
&:hover,
|
|
79
|
-
&.
|
|
79
|
+
&.route-link-active {
|
|
80
80
|
color: var(--c-text);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
|
|
94
94
|
> a {
|
|
95
95
|
&:hover,
|
|
96
|
-
&.
|
|
96
|
+
&.route-link-active {
|
|
97
97
|
margin-bottom: -2px;
|
|
98
98
|
border-bottom: 2px solid var(--c-text-accent);
|
|
99
99
|
}
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
> a {
|
|
110
110
|
&:hover,
|
|
111
|
-
&.
|
|
111
|
+
&.route-link-active {
|
|
112
112
|
margin-bottom: 0;
|
|
113
113
|
border-bottom: none;
|
|
114
114
|
}
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
|
|
118
118
|
a {
|
|
119
119
|
&:hover,
|
|
120
|
-
&.
|
|
120
|
+
&.route-link-active {
|
|
121
121
|
color: var(--c-text-accent);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -149,14 +149,19 @@ body {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// plugin-pwa-popup
|
|
152
|
-
|
|
153
|
-
--pwa-
|
|
154
|
-
--pwa-
|
|
155
|
-
--pwa-
|
|
156
|
-
--pwa-
|
|
157
|
-
--pwa-
|
|
158
|
-
--pwa-
|
|
159
|
-
|
|
152
|
+
html {
|
|
153
|
+
--pwa-text-color: var(--c-text);
|
|
154
|
+
--pwa-bg-color: var(--c-bg);
|
|
155
|
+
--pwa-border-color: var(--c-brand);
|
|
156
|
+
--pwa-btn-text-color: var(--c-bg);
|
|
157
|
+
--pwa-btn-bg-color: var(--c-brand);
|
|
158
|
+
--pwa-btn-hover-bg-color: var(--c-brand-light);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
html.dark {
|
|
162
|
+
--pwa-shadow-color: rgb(0 0 0 / 30%);
|
|
163
|
+
--pwa-content-color: #ccc;
|
|
164
|
+
--pwa-content-light-color: #999;
|
|
160
165
|
}
|
|
161
166
|
|
|
162
167
|
// plugin-redirect
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { RouteLocationNormalizedLoaded } from '
|
|
1
|
+
import type { RouteLocationNormalizedLoaded } from 'vuepress/client';
|
|
2
2
|
import type { ResolvedSidebarItem } from '../../shared/index.js';
|
|
3
3
|
export declare const isActiveSidebarItem: (item: ResolvedSidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/theme-default",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.15",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -42,28 +42,27 @@
|
|
|
42
42
|
"copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@vuepress/helper": "~2.0.0-rc.
|
|
46
|
-
"@vuepress/plugin-active-header-links": "2.0.0-rc.
|
|
47
|
-
"@vuepress/plugin-back-to-top": "2.0.0-rc.
|
|
48
|
-
"@vuepress/plugin-container": "2.0.0-rc.
|
|
49
|
-
"@vuepress/plugin-copy-code": "2.0.0-rc.
|
|
50
|
-
"@vuepress/plugin-external-link-icon": "2.0.0-rc.
|
|
51
|
-
"@vuepress/plugin-git": "2.0.0-rc.
|
|
52
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-rc.
|
|
53
|
-
"@vuepress/plugin-nprogress": "2.0.0-rc.
|
|
54
|
-
"@vuepress/plugin-palette": "2.0.0-rc.
|
|
55
|
-
"@vuepress/plugin-prismjs": "2.0.0-rc.
|
|
56
|
-
"@vuepress/plugin-seo": "2.0.0-rc.
|
|
57
|
-
"@vuepress/plugin-sitemap": "2.0.0-rc.
|
|
58
|
-
"@vuepress/plugin-theme-data": "2.0.0-rc.
|
|
45
|
+
"@vuepress/helper": "~2.0.0-rc.15",
|
|
46
|
+
"@vuepress/plugin-active-header-links": "~2.0.0-rc.15",
|
|
47
|
+
"@vuepress/plugin-back-to-top": "~2.0.0-rc.15",
|
|
48
|
+
"@vuepress/plugin-container": "2.0.0-rc.15",
|
|
49
|
+
"@vuepress/plugin-copy-code": "~2.0.0-rc.15",
|
|
50
|
+
"@vuepress/plugin-external-link-icon": "~2.0.0-rc.15",
|
|
51
|
+
"@vuepress/plugin-git": "2.0.0-rc.15",
|
|
52
|
+
"@vuepress/plugin-medium-zoom": "~2.0.0-rc.15",
|
|
53
|
+
"@vuepress/plugin-nprogress": "~2.0.0-rc.15",
|
|
54
|
+
"@vuepress/plugin-palette": "~2.0.0-rc.15",
|
|
55
|
+
"@vuepress/plugin-prismjs": "2.0.0-rc.15",
|
|
56
|
+
"@vuepress/plugin-seo": "~2.0.0-rc.15",
|
|
57
|
+
"@vuepress/plugin-sitemap": "~2.0.0-rc.15",
|
|
58
|
+
"@vuepress/plugin-theme-data": "~2.0.0-rc.15",
|
|
59
59
|
"@vueuse/core": "^10.7.2",
|
|
60
|
-
"sass": "^1.
|
|
61
|
-
"vue": "^3.4.
|
|
62
|
-
"vue-router": "^4.2.5"
|
|
60
|
+
"sass": "^1.71.0",
|
|
61
|
+
"vue": "^3.4.19"
|
|
63
62
|
},
|
|
64
63
|
"peerDependencies": {
|
|
65
64
|
"sass-loader": "^14.0.0",
|
|
66
|
-
"vuepress": "2.0.0-rc.
|
|
65
|
+
"vuepress": "2.0.0-rc.8"
|
|
67
66
|
},
|
|
68
67
|
"peerDependenciesMeta": {
|
|
69
68
|
"sass-loader": {
|
|
@@ -73,5 +72,5 @@
|
|
|
73
72
|
"publishConfig": {
|
|
74
73
|
"access": "public"
|
|
75
74
|
},
|
|
76
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "f85c8b1cf54e30b2267f6dbf27d06263d2cfbfbd"
|
|
77
76
|
}
|