@vuepress/theme-default 2.0.0-rc.42 → 2.0.0-rc.44
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/VPHomeHero.vue +7 -10
- package/lib/client/components/VPNavbar.vue +7 -2
- package/lib/client/components/VPNavbarBrand.vue +1 -1
- package/lib/client/components/VPNavbarDropdown.vue +3 -3
- package/lib/client/components/VPPageNav.vue +1 -1
- package/lib/client/components/VPSidebar.vue +2 -2
- package/lib/client/components/global/Badge.vue +6 -5
- package/lib/client/components/global/CodeGroup.d.ts +2 -2
- package/lib/client/config.js +0 -9
- package/lib/client/shim.d.ts +8 -0
- package/lib/client/styles/code-group.scss +1 -1
- package/lib/client/styles/normalize.scss +0 -66
- package/lib/client/styles/vars-dark.scss +11 -28
- package/lib/client/styles/vars.scss +14 -37
- package/lib/client/typings.d.ts +2 -2
- package/lib/node/defaultTheme.js +2 -17
- package/lib/shared/navbar.d.ts +3 -3
- package/package.json +28 -21
|
@@ -159,13 +159,12 @@ const HomeHeroImage: FunctionalComponent = () => {
|
|
|
159
159
|
|
|
160
160
|
box-sizing: border-box;
|
|
161
161
|
padding: 0.8rem 1.6rem;
|
|
162
|
-
border
|
|
163
|
-
border-style: solid;
|
|
162
|
+
border: 2px solid var(--vp-c-accent);
|
|
164
163
|
border-radius: 4px;
|
|
165
164
|
|
|
166
165
|
font-size: 1.2rem;
|
|
167
166
|
|
|
168
|
-
transition: background-color var(--vp-t-color);
|
|
167
|
+
transition: background-color border-color color var(--vp-t-color);
|
|
169
168
|
|
|
170
169
|
@media (max-width: $MQMobileNarrow) {
|
|
171
170
|
padding: 0.6rem 1.2rem;
|
|
@@ -173,24 +172,22 @@ const HomeHeroImage: FunctionalComponent = () => {
|
|
|
173
172
|
}
|
|
174
173
|
|
|
175
174
|
&.primary {
|
|
176
|
-
border-color: var(--vp-c-accent);
|
|
177
175
|
background-color: var(--vp-c-accent);
|
|
178
176
|
color: var(--vp-c-accent-text);
|
|
179
|
-
|
|
180
|
-
&:hover {
|
|
181
|
-
background-color: var(--vp-c-accent-hover);
|
|
182
|
-
}
|
|
183
177
|
}
|
|
184
178
|
|
|
185
179
|
&.secondary {
|
|
186
|
-
border-color: var(--vp-c-accent);
|
|
187
180
|
background-color: var(--vp-c-bg);
|
|
188
181
|
color: var(--vp-c-accent);
|
|
189
182
|
|
|
190
183
|
&:hover {
|
|
191
|
-
background-color: var(--vp-c-accent-hover);
|
|
192
184
|
color: var(--vp-c-accent-text);
|
|
193
185
|
}
|
|
194
186
|
}
|
|
187
|
+
|
|
188
|
+
&:hover {
|
|
189
|
+
border-color: var(--vp-c-accent-hover);
|
|
190
|
+
background-color: var(--vp-c-accent-hover);
|
|
191
|
+
}
|
|
195
192
|
}
|
|
196
193
|
</style>
|
|
@@ -5,8 +5,9 @@ import VPToggleColorModeButton from '@theme/VPToggleColorModeButton.vue'
|
|
|
5
5
|
import VPToggleSidebarButton from '@theme/VPToggleSidebarButton.vue'
|
|
6
6
|
import { useThemeLocaleData } from '@theme/useThemeData'
|
|
7
7
|
import { DeviceType, useUpdateDeviceStatus } from '@theme/useUpdateDeviceStatus'
|
|
8
|
+
import { hasGlobalComponent } from '@vuepress/helper/client'
|
|
8
9
|
import type { VNode } from 'vue'
|
|
9
|
-
import { computed, ref } from 'vue'
|
|
10
|
+
import { computed, ref, resolveComponent } from 'vue'
|
|
10
11
|
|
|
11
12
|
defineEmits<{
|
|
12
13
|
toggleSidebar: []
|
|
@@ -17,6 +18,10 @@ defineSlots<{
|
|
|
17
18
|
after?: (props: Record<never, never>) => VNode | VNode[] | null
|
|
18
19
|
}>()
|
|
19
20
|
|
|
21
|
+
const SearchBox = hasGlobalComponent('SearchBox')
|
|
22
|
+
? resolveComponent('SearchBox')
|
|
23
|
+
: null
|
|
24
|
+
|
|
20
25
|
const themeLocale = useThemeLocaleData()
|
|
21
26
|
|
|
22
27
|
const navbar = ref<HTMLElement | null>(null)
|
|
@@ -75,7 +80,7 @@ useUpdateDeviceStatus(
|
|
|
75
80
|
<VPNavbarItems class="vp-hide-mobile" />
|
|
76
81
|
<slot name="after" />
|
|
77
82
|
<VPToggleColorModeButton v-if="themeLocale.colorModeSwitch" />
|
|
78
|
-
<
|
|
83
|
+
<SearchBox />
|
|
79
84
|
</div>
|
|
80
85
|
</header>
|
|
81
86
|
</template>
|
|
@@ -86,7 +86,7 @@ const NavbarBrandLogo: FunctionalComponent = () => {
|
|
|
86
86
|
overflow: hidden;
|
|
87
87
|
|
|
88
88
|
// 5.5rem for navbar padding-inline
|
|
89
|
-
// 4.5rem for ColorModeSwitch and
|
|
89
|
+
// 4.5rem for ColorModeSwitch and SearchBox
|
|
90
90
|
// 1rem for gap
|
|
91
91
|
width: calc(100vw - 11rem);
|
|
92
92
|
|
|
@@ -162,10 +162,10 @@ watch(
|
|
|
162
162
|
max-height: calc(100vh - 2.7rem);
|
|
163
163
|
margin: 0;
|
|
164
164
|
padding: 0.6rem 0;
|
|
165
|
-
border: 1px solid var(--vp-c-
|
|
166
|
-
border-radius: 0.
|
|
165
|
+
border: 1px solid var(--vp-c-gutter);
|
|
166
|
+
border-radius: 0.5rem;
|
|
167
167
|
|
|
168
|
-
background-color: var(--vp-
|
|
168
|
+
background-color: var(--vp-c-bg-elv);
|
|
169
169
|
|
|
170
170
|
text-align: left;
|
|
171
171
|
white-space: nowrap;
|
|
@@ -46,7 +46,7 @@ defineSlots<{
|
|
|
46
46
|
background-color var(--vp-t-color),
|
|
47
47
|
border-color var(--vp-t-color);
|
|
48
48
|
|
|
49
|
-
scrollbar-color: var(--vp-c-accent) var(--vp-c-gutter);
|
|
49
|
+
scrollbar-color: var(--vp-c-accent-bg) var(--vp-c-gutter);
|
|
50
50
|
scrollbar-width: thin;
|
|
51
51
|
|
|
52
52
|
// narrow desktop / iPad
|
|
@@ -73,7 +73,7 @@ defineSlots<{
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
&::-webkit-scrollbar-thumb {
|
|
76
|
-
background-color: var(--vp-c-accent);
|
|
76
|
+
background-color: var(--vp-c-accent-bg);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
// override styles
|
|
@@ -60,17 +60,18 @@ defineSlots<{
|
|
|
60
60
|
background-color var(--vp-t-color);
|
|
61
61
|
|
|
62
62
|
&.tip {
|
|
63
|
-
background-color: var(--c-
|
|
63
|
+
background-color: var(--badge-c-tip);
|
|
64
|
+
color: var(--badge-c-tip-text);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
&.warning {
|
|
67
|
-
background-color: var(--c-
|
|
68
|
-
color: var(--c-
|
|
68
|
+
background-color: var(--badge-c-warning);
|
|
69
|
+
color: var(--badge-c-warning-text);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
&.danger {
|
|
72
|
-
background-color: var(--c-
|
|
73
|
-
color: var(--c-
|
|
73
|
+
background-color: var(--badge-c-danger);
|
|
74
|
+
color: var(--badge-c-danger-text);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
// update the vertical align for the badge in toc
|
|
@@ -2,6 +2,6 @@ import type { SlotsType, VNode } from 'vue';
|
|
|
2
2
|
import '../../styles/code-group.scss';
|
|
3
3
|
export declare const CodeGroup: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
4
4
|
[key: string]: any;
|
|
5
|
-
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<
|
|
5
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, SlotsType<{
|
|
6
6
|
default?: () => VNode[];
|
|
7
|
-
}
|
|
7
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/lib/client/config.js
CHANGED
|
@@ -2,7 +2,6 @@ import { setupDarkMode } from '@theme/useDarkMode';
|
|
|
2
2
|
import { useScrollPromise } from '@theme/useScrollPromise';
|
|
3
3
|
import { setupSidebarItems } from '@theme/useSidebarItems';
|
|
4
4
|
import { hasGlobalComponent } from '@vuepress/helper/client';
|
|
5
|
-
import { h } from 'vue';
|
|
6
5
|
import { defineClientConfig } from 'vuepress/client';
|
|
7
6
|
import { Badge, CodeGroup, CodeGroupItem } from './components/global/index.js';
|
|
8
7
|
import Layout from './layouts/Layout.vue';
|
|
@@ -18,14 +17,6 @@ export default defineClientConfig({
|
|
|
18
17
|
app.component('CodeGroup', CodeGroup);
|
|
19
18
|
if (!hasGlobalComponent('CodeGroupItem'))
|
|
20
19
|
app.component('CodeGroupItem', CodeGroupItem);
|
|
21
|
-
// compat with @vuepress/plugin-docsearch and @vuepress/plugin-search
|
|
22
|
-
app.component('VPSearch', () => {
|
|
23
|
-
const SearchComponent = app.component('Docsearch') ?? app.component('SearchBox');
|
|
24
|
-
if (SearchComponent) {
|
|
25
|
-
return h(SearchComponent);
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
});
|
|
29
20
|
// handle scrollBehavior with transition
|
|
30
21
|
const scrollBehavior = router.options.scrollBehavior;
|
|
31
22
|
router.options.scrollBehavior = async (...args) => {
|
package/lib/client/shim.d.ts
CHANGED
|
@@ -5,7 +5,15 @@ declare module '*.vue' {
|
|
|
5
5
|
export default comp
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
declare module '*.css' {
|
|
9
|
+
export {}
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
declare module '*/styles/_variables.module.scss' {
|
|
9
13
|
const cSSVariables: Record<string, string>
|
|
10
14
|
export default cSSVariables
|
|
11
15
|
}
|
|
16
|
+
|
|
17
|
+
declare module '*.scss' {
|
|
18
|
+
export {}
|
|
19
|
+
}
|
|
@@ -1,73 +1,7 @@
|
|
|
1
|
-
html,
|
|
2
1
|
body {
|
|
3
|
-
background-color: var(--vp-c-bg);
|
|
4
|
-
accent-color: var(--vp-c-accent);
|
|
5
|
-
transition: background-color var(--vp-t-color);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
[data-theme='dark'] {
|
|
9
|
-
color-scheme: dark;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
body {
|
|
13
|
-
color: var(--vp-c-text);
|
|
14
|
-
font-size: 1rem;
|
|
15
2
|
font-family: var(--font-family);
|
|
16
3
|
}
|
|
17
4
|
|
|
18
|
-
h2 {
|
|
19
|
-
border-color: var(--vp-c-gutter);
|
|
20
|
-
transition: border-color var(--vp-t-color);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
a {
|
|
24
|
-
color: var(--vp-c-accent);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
5
|
code {
|
|
28
|
-
background-color: var(--vp-c-bg-alt);
|
|
29
|
-
color: var(--vp-c-text-mute);
|
|
30
6
|
font-family: var(--code-font-family);
|
|
31
|
-
transition: background-color var(--vp-t-color);
|
|
32
|
-
|
|
33
|
-
p a & {
|
|
34
|
-
color: var(--vp-c-accent);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
kbd {
|
|
39
|
-
border-color: var(--vp-c-border-hard);
|
|
40
|
-
transition: border-color var(--vp-t-color);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
blockquote {
|
|
44
|
-
border-color: var(--vp-c-border-hard);
|
|
45
|
-
color: var(--vp-c-text-mute);
|
|
46
|
-
transition: border-color var(--vp-t-color);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
hr {
|
|
50
|
-
border-color: var(--vp-c-gutter);
|
|
51
|
-
transition: border-color var(--vp-t-color);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
table {
|
|
55
|
-
transition: border-color var(--vp-t-color);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
tr {
|
|
59
|
-
&:nth-child(odd) {
|
|
60
|
-
background-color: var(--vp-c-bg-alt);
|
|
61
|
-
transition: background-color var(--vp-t-color);
|
|
62
|
-
|
|
63
|
-
code {
|
|
64
|
-
background-color: var(--vp-c-gutter);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
th,
|
|
70
|
-
td {
|
|
71
|
-
border-color: var(--vp-c-border-hard);
|
|
72
|
-
transition: border-color var(--vp-t-color);
|
|
73
7
|
}
|
|
@@ -1,47 +1,30 @@
|
|
|
1
1
|
[data-theme='dark'] {
|
|
2
2
|
// brand colors
|
|
3
|
-
--vp-c-accent: #
|
|
3
|
+
--vp-c-accent: #3dd68c;
|
|
4
|
+
--vp-c-accent-bg: #3aa675;
|
|
4
5
|
--vp-c-accent-hover: #349469;
|
|
6
|
+
--vp-c-accent-soft: rgb(16 185 129 / 16%);
|
|
5
7
|
|
|
6
8
|
// background colors
|
|
7
|
-
--vp-c-bg: #
|
|
8
|
-
--vp-c-bg-alt: #
|
|
9
|
-
--vp-c-bg-elv: #
|
|
9
|
+
--vp-c-bg: #1b1b1f;
|
|
10
|
+
--vp-c-bg-alt: #161618;
|
|
11
|
+
--vp-c-bg-elv: #202127;
|
|
10
12
|
|
|
11
13
|
// text colors
|
|
12
|
-
--vp-c-text:
|
|
14
|
+
--vp-c-text: rgb(235 235 245 / 86%);
|
|
13
15
|
--vp-c-text-mute: rgb(235 235 245 / 60%);
|
|
14
16
|
--vp-c-text-subtle: rgb(235 235 245 / 38%);
|
|
15
17
|
|
|
16
18
|
// border colors
|
|
17
|
-
--vp-c-border: #3e4c5a;
|
|
18
19
|
--vp-c-gutter: #373f4c;
|
|
20
|
+
--vp-c-border: #3e4c5a;
|
|
19
21
|
--vp-c-border-hard: #405064;
|
|
20
22
|
|
|
21
23
|
// shadow color
|
|
22
24
|
--vp-c-shadow: rgb(0 0 0 / 30%);
|
|
23
|
-
--vp-c-shadow-hard: #2f3841;
|
|
24
25
|
|
|
25
26
|
// control colors
|
|
26
|
-
--vp-c-control:
|
|
27
|
-
--vp-c-control-hover:
|
|
28
|
-
--vp-c-control-
|
|
29
|
-
--vp-c-control-disabled: #3e4c5a;
|
|
30
|
-
|
|
31
|
-
// badge component colors
|
|
32
|
-
--c-badge-warning: var(--c-warning);
|
|
33
|
-
--c-badge-warning-text: #3c2e05;
|
|
34
|
-
--c-badge-danger: var(--c-danger);
|
|
35
|
-
--c-badge-danger-text: #401416;
|
|
36
|
-
|
|
37
|
-
// plugin-docsearch
|
|
38
|
-
/* stylelint-disable-next-line selector-class-pattern */
|
|
39
|
-
.DocSearch {
|
|
40
|
-
--docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309;
|
|
41
|
-
--docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d,
|
|
42
|
-
0 2px 2px 0 rgb(3 4 9 / 30%);
|
|
43
|
-
--docsearch-key-gradient: linear-gradient(-225deg, #444950, #1c1e21);
|
|
44
|
-
--docsearch-footer-shadow: inset 0 1px 0 0 rgb(73 76 106 / 50%),
|
|
45
|
-
0 -4px 8px 0 rgb(0 0 0 / 20%);
|
|
46
|
-
}
|
|
27
|
+
--vp-c-control: rgb(101 117 133 / 12%);
|
|
28
|
+
--vp-c-control-hover: rgb(101 117 133 / 18%);
|
|
29
|
+
--vp-c-control-disabled: #363636;
|
|
47
30
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// === colors ===
|
|
2
2
|
:root {
|
|
3
3
|
// accent colors
|
|
4
|
-
--vp-c-accent: #
|
|
4
|
+
--vp-c-accent: #299764;
|
|
5
|
+
--vp-c-accent-bg: #3eaf7c;
|
|
5
6
|
--vp-c-accent-hover: #4abf8a;
|
|
6
7
|
--vp-c-accent-text: var(--vp-c-white);
|
|
8
|
+
--vp-c-accent-soft: rgb(16 185 129 / 14%);
|
|
7
9
|
|
|
8
10
|
// background colors
|
|
9
11
|
--vp-c-bg: #fff;
|
|
@@ -11,24 +13,22 @@
|
|
|
11
13
|
--vp-c-bg-elv: #fff;
|
|
12
14
|
|
|
13
15
|
// text colors
|
|
14
|
-
--vp-c-text:
|
|
16
|
+
--vp-c-text: rgb(60 60 67);
|
|
15
17
|
--vp-c-text-mute: rgb(60 60 67 / 78%);
|
|
16
18
|
--vp-c-text-subtle: rgb(60 60 67 / 56%);
|
|
17
19
|
|
|
18
20
|
// border colors
|
|
19
|
-
--vp-c-border: #d7d9da;
|
|
20
21
|
--vp-c-gutter: #eaecef;
|
|
22
|
+
--vp-c-border: #d7d9da;
|
|
21
23
|
--vp-c-border-hard: #d1d4d7;
|
|
22
24
|
|
|
23
25
|
// shadow colors
|
|
24
26
|
--vp-c-shadow: rgb(0 0 0 / 15%);
|
|
25
|
-
--vp-c-shadow-hard: #f1f3f5;
|
|
26
27
|
|
|
27
28
|
// control colors
|
|
28
|
-
--vp-c-control:
|
|
29
|
-
--vp-c-control-hover:
|
|
30
|
-
--vp-c-control-
|
|
31
|
-
--vp-c-control-disabled: #ccc;
|
|
29
|
+
--vp-c-control: rgb(142 150 170 / 10%);
|
|
30
|
+
--vp-c-control-hover: rgb(142 150 170 / 16%);
|
|
31
|
+
--vp-c-control-disabled: #eaeaea;
|
|
32
32
|
|
|
33
33
|
// layout colors
|
|
34
34
|
--vp-navbar-c-bg: var(--vp-c-bg);
|
|
@@ -40,11 +40,12 @@
|
|
|
40
40
|
--vp-c-code-tab-active: var(--vp-c-accent);
|
|
41
41
|
|
|
42
42
|
// badge colors
|
|
43
|
-
--c-
|
|
44
|
-
--c-
|
|
45
|
-
--c-
|
|
46
|
-
--c-
|
|
47
|
-
--c-
|
|
43
|
+
--badge-c-tip: var(--vp-c-green-soft);
|
|
44
|
+
--badge-c-tip-text: var(--vp-c-green-text);
|
|
45
|
+
--badge-c-warning: var(--vp-c-yellow-soft);
|
|
46
|
+
--badge-c-warning-text: var(--vp-c-yellow-text);
|
|
47
|
+
--badge-c-danger: var(--vp-c-red-soft);
|
|
48
|
+
--badge-c-danger-text: var(--vp-c-red-text);
|
|
48
49
|
|
|
49
50
|
// font vars
|
|
50
51
|
--font-family: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', roboto, oxygen,
|
|
@@ -67,27 +68,3 @@
|
|
|
67
68
|
--external-link-icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");
|
|
68
69
|
--external-link-c-icon: var(--vp-c-text-mute);
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
-
// plugin-docsearch
|
|
72
|
-
/* stylelint-disable-next-line selector-class-pattern */
|
|
73
|
-
.DocSearch {
|
|
74
|
-
--docsearch-primary-color: var(--vp-c-accent);
|
|
75
|
-
--docsearch-text-color: var(--vp-c-text);
|
|
76
|
-
--docsearch-highlight-color: var(--vp-c-accent);
|
|
77
|
-
--docsearch-muted-color: var(--vp-c-text-mute);
|
|
78
|
-
--docsearch-container-background: rgb(9 10 17 / 80%);
|
|
79
|
-
--docsearch-modal-background: var(--vp-c-bg-alt);
|
|
80
|
-
--docsearch-searchbox-background: var(--vp-c-gutter);
|
|
81
|
-
--docsearch-searchbox-focus-background: var(--vp-c-bg);
|
|
82
|
-
--docsearch-searchbox-shadow: inset 0 0 0 2px var(--vp-c-accent);
|
|
83
|
-
--docsearch-hit-color: var(--vp-c-text-mute);
|
|
84
|
-
--docsearch-hit-active-color: var(--vp-c-bg);
|
|
85
|
-
--docsearch-hit-background: var(--vp-c-bg);
|
|
86
|
-
--docsearch-hit-shadow: 0 1px 3px 0 var(--vp-c-border-hard);
|
|
87
|
-
--docsearch-footer-background: var(--vp-c-bg);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// plugin-search
|
|
91
|
-
.search-box {
|
|
92
|
-
--search-c-item-text: var(--vp-c-text-subtle);
|
|
93
|
-
}
|
package/lib/client/typings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AutoLinkOptions, NavGroup,
|
|
2
|
-
export type NavbarItem =
|
|
1
|
+
import type { AutoLinkOptions, NavGroup, SidebarGroupOptions, SidebarLinkOptions } from '../shared/index.js';
|
|
2
|
+
export type NavbarItem = AutoLinkOptions | NavGroup<NavbarItem>;
|
|
3
3
|
export type SidebarLinkItem = SidebarLinkOptions;
|
|
4
4
|
export interface SidebarHeaderItem {
|
|
5
5
|
text: string;
|
package/lib/node/defaultTheme.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
1
|
import { addViteConfig, addViteOptimizeDepsExclude, chainWebpack, } from '@vuepress/helper';
|
|
3
2
|
import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links';
|
|
4
3
|
import { backToTopPlugin } from '@vuepress/plugin-back-to-top';
|
|
@@ -48,24 +47,10 @@ export const defaultTheme = ({ hostname, themePlugins = {}, ...localeOptions } =
|
|
|
48
47
|
css: {
|
|
49
48
|
preprocessorOptions: {
|
|
50
49
|
sass: {
|
|
51
|
-
|
|
52
|
-
warn: (message, { deprecation, deprecationType }) => {
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
54
|
-
if (deprecation && deprecationType.id === 'mixed-decls')
|
|
55
|
-
return;
|
|
56
|
-
console.warn(message);
|
|
57
|
-
},
|
|
58
|
-
},
|
|
50
|
+
silenceDeprecations: ['mixed-decls'],
|
|
59
51
|
},
|
|
60
52
|
scss: {
|
|
61
|
-
|
|
62
|
-
warn: (message, { deprecation, deprecationType }) => {
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
64
|
-
if (deprecation && deprecationType.id === 'mixed-decls')
|
|
65
|
-
return;
|
|
66
|
-
console.warn(message);
|
|
67
|
-
},
|
|
68
|
-
},
|
|
53
|
+
silenceDeprecations: ['mixed-decls'],
|
|
69
54
|
},
|
|
70
55
|
},
|
|
71
56
|
},
|
package/lib/shared/navbar.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export interface NavGroup<T> extends NavItemOptions {
|
|
|
16
16
|
*/
|
|
17
17
|
children: T[];
|
|
18
18
|
}
|
|
19
|
-
export type NavbarLinkOptions = AutoLinkOptions;
|
|
20
|
-
export type NavbarGroupOptions = NavGroup<NavbarLinkOptions | NavGroup<NavbarLinkOptions
|
|
21
|
-
export type NavbarOptions = (NavbarGroupOptions | NavbarLinkOptions
|
|
19
|
+
export type NavbarLinkOptions = AutoLinkOptions | string;
|
|
20
|
+
export type NavbarGroupOptions = NavGroup<NavbarLinkOptions | NavGroup<NavbarLinkOptions>>;
|
|
21
|
+
export type NavbarOptions = (NavbarGroupOptions | NavbarLinkOptions)[] | false;
|
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.44",
|
|
4
4
|
"description": "Default theme of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-theme",
|
|
@@ -37,30 +37,37 @@
|
|
|
37
37
|
"templates"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@vuepress/helper": "2.0.0-rc.
|
|
41
|
-
"@vuepress/plugin-active-header-links": "2.0.0-rc.
|
|
42
|
-
"@vuepress/plugin-back-to-top": "2.0.0-rc.
|
|
43
|
-
"@vuepress/plugin-copy-code": "2.0.0-rc.
|
|
44
|
-
"@vuepress/plugin-git": "2.0.0-rc.
|
|
45
|
-
"@vuepress/plugin-links-check": "2.0.0-rc.
|
|
46
|
-
"@vuepress/plugin-markdown-container": "2.0.0-rc.
|
|
47
|
-
"@vuepress/plugin-markdown-hint": "2.0.0-rc.
|
|
48
|
-
"@vuepress/plugin-medium-zoom": "2.0.0-rc.
|
|
49
|
-
"@vuepress/plugin-nprogress": "2.0.0-rc.
|
|
50
|
-
"@vuepress/plugin-palette": "2.0.0-rc.
|
|
51
|
-
"@vuepress/plugin-prismjs": "2.0.0-rc.
|
|
52
|
-
"@vuepress/plugin-seo": "2.0.0-rc.
|
|
53
|
-
"@vuepress/plugin-sitemap": "2.0.0-rc.
|
|
54
|
-
"@vuepress/plugin-theme-data": "2.0.0-rc.
|
|
55
|
-
"@vueuse/core": "^11.0
|
|
56
|
-
"
|
|
57
|
-
"vue": "^3.4.38"
|
|
40
|
+
"@vuepress/helper": "2.0.0-rc.44",
|
|
41
|
+
"@vuepress/plugin-active-header-links": "2.0.0-rc.44",
|
|
42
|
+
"@vuepress/plugin-back-to-top": "2.0.0-rc.44",
|
|
43
|
+
"@vuepress/plugin-copy-code": "2.0.0-rc.44",
|
|
44
|
+
"@vuepress/plugin-git": "2.0.0-rc.44",
|
|
45
|
+
"@vuepress/plugin-links-check": "2.0.0-rc.44",
|
|
46
|
+
"@vuepress/plugin-markdown-container": "2.0.0-rc.43",
|
|
47
|
+
"@vuepress/plugin-markdown-hint": "2.0.0-rc.44",
|
|
48
|
+
"@vuepress/plugin-medium-zoom": "2.0.0-rc.44",
|
|
49
|
+
"@vuepress/plugin-nprogress": "2.0.0-rc.44",
|
|
50
|
+
"@vuepress/plugin-palette": "2.0.0-rc.44",
|
|
51
|
+
"@vuepress/plugin-prismjs": "2.0.0-rc.44",
|
|
52
|
+
"@vuepress/plugin-seo": "2.0.0-rc.44",
|
|
53
|
+
"@vuepress/plugin-sitemap": "2.0.0-rc.44",
|
|
54
|
+
"@vuepress/plugin-theme-data": "2.0.0-rc.44",
|
|
55
|
+
"@vueuse/core": "^11.1.0",
|
|
56
|
+
"vue": "^3.5.6"
|
|
58
57
|
},
|
|
59
58
|
"peerDependencies": {
|
|
60
|
-
"sass
|
|
59
|
+
"sass": "^1.79.0",
|
|
60
|
+
"sass-embedded": "^1.79.0",
|
|
61
|
+
"sass-loader": "^16.0.1",
|
|
61
62
|
"vuepress": "2.0.0-rc.15"
|
|
62
63
|
},
|
|
63
64
|
"peerDependenciesMeta": {
|
|
65
|
+
"sass": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"sass-embedded": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
64
71
|
"sass-loader": {
|
|
65
72
|
"optional": true
|
|
66
73
|
}
|
|
@@ -68,5 +75,5 @@
|
|
|
68
75
|
"publishConfig": {
|
|
69
76
|
"access": "public"
|
|
70
77
|
},
|
|
71
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "e450489799bbfbdd015ec52255576144185eb64f"
|
|
72
79
|
}
|