@vuepress/theme-default 2.0.0-rc.14 → 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.
@@ -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 'vue-router'
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 'vue-router'
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 { useRoute } from 'vue-router'
8
- import { useRouteLocale, useSiteData, useSiteLocaleData } from 'vuepress/client'
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 'vue-router'
5
- import { useRoute, useRouter } from 'vue-router'
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 'vue-router'
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 'vue-router'
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 'vue-router';
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 'vue-router'
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
- &.router-link-active {
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
- &.router-link-active {
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
- &.router-link-active {
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
- &.router-link-active {
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
- &.router-link-active {
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
- &.router-link-active {
120
+ &.route-link-active {
121
121
  color: var(--c-text-accent);
122
122
  }
123
123
  }
@@ -43,7 +43,7 @@
43
43
  .navbar-dropdown-wrapper
44
44
  .navbar-dropdown
45
45
  .navbar-dropdown-item
46
- a.router-link-active::after {
46
+ a.route-link-active::after {
47
47
  top: calc(1rem - 2px);
48
48
  }
49
49
  }
@@ -149,14 +149,19 @@ body {
149
149
  }
150
150
 
151
151
  // plugin-pwa-popup
152
- .pwa-popup {
153
- --pwa-popup-text-color: var(--c-text);
154
- --pwa-popup-bg-color: var(--c-bg);
155
- --pwa-popup-border-color: var(--c-brand);
156
- --pwa-popup-shadow: 0 4px 16px var(--c-brand);
157
- --pwa-popup-btn-text-color: var(--c-bg);
158
- --pwa-popup-btn-bg-color: var(--c-brand);
159
- --pwa-popup-btn-hover-bg-color: var(--c-brand-light);
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 'vue-router';
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.14",
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.14",
46
- "@vuepress/plugin-active-header-links": "~2.0.0-rc.14",
47
- "@vuepress/plugin-back-to-top": "~2.0.0-rc.14",
48
- "@vuepress/plugin-container": "~2.0.0-rc.12",
49
- "@vuepress/plugin-copy-code": "~2.0.0-rc.14",
50
- "@vuepress/plugin-external-link-icon": "~2.0.0-rc.14",
51
- "@vuepress/plugin-git": "~2.0.0-rc.12",
52
- "@vuepress/plugin-medium-zoom": "~2.0.0-rc.14",
53
- "@vuepress/plugin-nprogress": "~2.0.0-rc.14",
54
- "@vuepress/plugin-palette": "~2.0.0-rc.14",
55
- "@vuepress/plugin-prismjs": "~2.0.0-rc.12",
56
- "@vuepress/plugin-seo": "~2.0.0-rc.14",
57
- "@vuepress/plugin-sitemap": "~2.0.0-rc.14",
58
- "@vuepress/plugin-theme-data": "~2.0.0-rc.14",
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.70.0",
61
- "vue": "^3.4.16",
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.7"
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": "cf292f189b5b4852a241bffc48c45112f647b2de"
75
+ "gitHead": "f85c8b1cf54e30b2267f6dbf27d06263d2cfbfbd"
77
76
  }